X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=block%2Fgenhd.c;h=00da5219ee37c02a066d45e6ceefa65d9606d5e6;hb=50be4917ee70218f59e04dec029121b97fb9cb3d;hp=abc6feddc8c689dbf177ff96fde4dc42367340e3;hpb=ff88972c850ced92b9c4c7f538d85829c741eeb0;p=linux-2.6 diff --git a/block/genhd.c b/block/genhd.c index abc6feddc8..00da5219ee 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -24,6 +24,8 @@ static DEFINE_MUTEX(block_class_lock); struct kobject *block_depr; #endif +static struct device_type disk_type; + /* * Can be deleted altogether. Later. * @@ -358,7 +360,9 @@ static struct kobject *base_probe(dev_t devt, int *part, void *data) static int __init genhd_device_init(void) { - class_register(&block_class); + int error = class_register(&block_class); + if (unlikely(error)) + return error; bdev_map = kobj_map_init(base_probe, &block_class_lock); blk_dev_init(); @@ -502,7 +506,7 @@ struct class block_class = { .name = "block", }; -struct device_type disk_type = { +static struct device_type disk_type = { .name = "disk", .groups = disk_attr_groups, .release = disk_release, @@ -632,12 +636,14 @@ static void media_change_notify_thread(struct work_struct *work) put_device(gd->driverfs_dev); } +#if 0 void genhd_media_change_notify(struct gendisk *disk) { get_device(disk->driverfs_dev); schedule_work(&disk->async_notify); } EXPORT_SYMBOL_GPL(genhd_media_change_notify); +#endif /* 0 */ dev_t blk_lookup_devt(const char *name) {