Merge branch 'master' of /home/sam/kernel/linux-2.6/
[pandora-kernel.git] / block / genhd.c
index d965725..25d1f42 100644 (file)
@@ -2,7 +2,6 @@
  *  gendisk handling
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/fs.h>
 #include <linux/genhd.h>
@@ -17,8 +16,7 @@
 #include <linux/buffer_head.h>
 #include <linux/mutex.h>
 
-static struct subsystem block_subsys;
-
+struct subsystem block_subsys;
 static DEFINE_MUTEX(block_subsys_lock);
 
 /*
@@ -182,7 +180,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 +425,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 +509,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