diff options
author | Paul Mackerras <paulus@samba.org> | 2008-03-13 15:26:33 +1100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-03-13 15:26:33 +1100 |
commit | bed04a4413376265746053be2a9cfbfc80c98ec9 (patch) | |
tree | 8f582294a655f70496cd08aedeb86de31dbad140 /block/genhd.c | |
parent | e37c772e36a7943b2e0bd8f48312e78474c0df15 (diff) | |
parent | c463be3520065ef8c05e3cbdf946c69604e91ceb (diff) |
Merge branch 'linux-2.6'
Diffstat (limited to 'block/genhd.c')
-rw-r--r-- | block/genhd.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/block/genhd.c b/block/genhd.c index 53f2238e69c..00da5219ee3 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -17,11 +17,15 @@ #include <linux/buffer_head.h> #include <linux/mutex.h> +#include "blk.h" + static DEFINE_MUTEX(block_class_lock); #ifndef CONFIG_SYSFS_DEPRECATED struct kobject *block_depr; #endif +static struct device_type disk_type; + /* * Can be deleted altogether. Later. * @@ -346,8 +350,6 @@ const struct seq_operations partitions_op = { #endif -extern int blk_dev_init(void); - static struct kobject *base_probe(dev_t devt, int *part, void *data) { if (request_module("block-major-%d-%d", MAJOR(devt), MINOR(devt)) > 0) @@ -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) { |