X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=block%2Fgenhd.c;h=8d7339511e5e962dfccca43298a06e24a48df846;hb=64f65ca6e7a5a42df22ff29dadfff389dc388f65;hp=d96572589621e10ecae8107616459f227e3be111;hpb=bed7a560333d40269a886c4421d4c8f964a32177;p=linux-2.6 diff --git a/block/genhd.c b/block/genhd.c index d965725896..8d7339511e 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -17,8 +17,7 @@ #include #include -static struct subsystem block_subsys; - +struct subsystem block_subsys; static DEFINE_MUTEX(block_subsys_lock); /* @@ -182,7 +181,6 @@ static int exact_lock(dev_t dev, void *data) */ void add_disk(struct gendisk *disk) { - get_device(disk->driverfs_dev); disk->flags |= GENHD_FL_UP; blk_register_region(MKDEV(disk->major, disk->first_minor), disk->minors, NULL, exact_match, exact_lock, disk); @@ -428,7 +426,6 @@ static struct attribute * default_attrs[] = { static void disk_release(struct kobject * kobj) { struct gendisk *disk = to_disk(kobj); - put_device(disk->driverfs_dev); kfree(disk->random); kfree(disk->part); free_disk_stats(disk); @@ -513,9 +510,7 @@ static struct kset_uevent_ops block_uevent_ops = { .uevent = block_uevent, }; -/* declare block_subsys. */ -static decl_subsys(block, &ktype_block, &block_uevent_ops); - +decl_subsys(block, &ktype_block, &block_uevent_ops); /* * aggregate disk stat collector. Uses the same stats that the sysfs