bsg: bind bsg to request_queue instead of gendisk
This patch binds bsg devices to request_queue instead of gendisk. Any
objects (like transport entities) can define own request_handler and
create own bsg device.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/include/linux/bsg.h b/include/linux/bsg.h
index 2154a6d..0475a6d 100644
--- a/include/linux/bsg.h
+++ b/include/linux/bsg.h
@@ -47,16 +47,16 @@
struct class_device *class_dev;
struct device *dev;
int minor;
- struct gendisk *disk;
struct list_head list;
+ struct request_queue *queue;
};
-extern int bsg_register_disk(struct gendisk *);
-extern void bsg_unregister_disk(struct gendisk *);
+extern int bsg_register_queue(struct request_queue *, char *);
+extern void bsg_unregister_queue(struct request_queue *);
#else
struct bsg_class_device { };
-#define bsg_register_disk(disk) (0)
-#define bsg_unregister_disk(disk) do { } while (0)
+#define bsg_register_queue(disk, name) (0)
+#define bsg_unregister_queue(disk) do { } while (0)
#endif
#endif /* __KERNEL__ */