@@ -629,7 +629,7 @@ static void register_disk(struct device *parent, struct gendisk *disk)
}
/**
- * device_add_disk - add partitioning information to kernel list
+ * blk_add_disk - add partitioning information to kernel list
* @parent: parent device for the disk
* @disk: per-device partitioning information
*
@@ -638,7 +638,7 @@ static void register_disk(struct device *parent, struct gendisk *disk)
*
* FIXME: error handling
*/
-void device_add_disk(struct device *parent, struct gendisk *disk)
+void blk_add_disk(struct device *parent, struct gendisk *disk)
{
dev_t devt;
int retval;
@@ -682,7 +682,6 @@ void device_add_disk(struct device *parent, struct gendisk *disk)
exact_match, exact_lock, disk);
}
register_disk(parent, disk);
- blk_register_queue(disk);
/*
* Take an extra ref on queue which will be put on disk_release()
@@ -693,6 +692,21 @@ void device_add_disk(struct device *parent, struct gendisk *disk)
disk_add_events(disk);
blk_integrity_add(disk);
}
+EXPORT_SYMBOL(blk_add_disk)
+
+/**
+ * device_add_disk - add disk information to kernel list
+ * @parent: parent device for the disk
+ * @disk: per-device disk information
+ *
+ * Adds partitioning information via blk_add_disk() and
+ * also also registers the associated request_queue to @disk.
+ */
+void device_add_disk(struct device *parent, struct gendisk *disk)
+{
+ blk_add_disk(parent, disk);
+ blk_register_queue(disk);
+}
EXPORT_SYMBOL(device_add_disk);
void del_gendisk(struct gendisk *disk)
@@ -390,6 +390,7 @@ static inline void free_part_info(struct hd_struct *part)
extern void part_round_stats(struct request_queue *q, int cpu, struct hd_struct *part);
/* block/genhd.c */
+extern void blk_add_disk(struct device *parent, struct gendisk *disk);
extern void device_add_disk(struct device *parent, struct gendisk *disk);
static inline void add_disk(struct gendisk *disk)
{