aboutsummaryrefslogtreecommitdiffstats
path: root/block/genhd.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/genhd.c')
-rw-r--r--block/genhd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/block/genhd.c b/block/genhd.c
index 9074f384b097..24e3fc9095fe 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -370,7 +370,10 @@ static struct kobject *base_probe(dev_t devt, int *part, void *data)
370 370
371static int __init genhd_device_init(void) 371static int __init genhd_device_init(void)
372{ 372{
373 int error = class_register(&block_class); 373 int error;
374
375 block_class.dev_kobj = sysfs_dev_block_kobj;
376 error = class_register(&block_class);
374 if (unlikely(error)) 377 if (unlikely(error))
375 return error; 378 return error;
376 bdev_map = kobj_map_init(base_probe, &block_class_lock); 379 bdev_map = kobj_map_init(base_probe, &block_class_lock);