summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_priv.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-07-29 08:48:42 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2021-07-31 04:22:36 +0200
commitead09dd3aed5cc6a6c6288a87a5bfa9bbc8d5ecf (patch)
tree745a435c272dbf099f340c69c827ee43f6f016a8 /drivers/scsi/scsi_priv.h
parentscsi: sr: cdrom: Move cdrom_read_cdda_bpc() into the sr driver (diff)
downloadlinux-ead09dd3aed5cc6a6c6288a87a5bfa9bbc8d5ecf.tar.xz
linux-ead09dd3aed5cc6a6c6288a87a5bfa9bbc8d5ecf.zip
scsi: bsg: Simplify device registration
Use the per-device cdev_device_interface to store the bsg data in the char device inode, and thus remove the need to embedd the bsg_class_device structure in the request_queue. Link: https://lore.kernel.org/r/20210729064845.1044147-2-hch@lst.de Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/scsi_priv.h')
-rw-r--r--drivers/scsi/scsi_priv.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/scsi/scsi_priv.h b/drivers/scsi/scsi_priv.h
index 0a0db35bab04..6d9152031a40 100644
--- a/drivers/scsi/scsi_priv.h
+++ b/drivers/scsi/scsi_priv.h
@@ -7,6 +7,7 @@
#include <scsi/scsi_device.h>
#include <linux/sbitmap.h>
+struct bsg_device;
struct request_queue;
struct request;
struct scsi_cmnd;
@@ -180,15 +181,7 @@ static inline void scsi_dh_add_device(struct scsi_device *sdev) { }
static inline void scsi_dh_release_device(struct scsi_device *sdev) { }
#endif
-#ifdef CONFIG_BLK_DEV_BSG
-int scsi_bsg_register_queue(struct request_queue *q, struct device *parent);
-#else
-static inline int scsi_bsg_register_queue(struct request_queue *q,
- struct device *parent)
-{
- return 0;
-}
-#endif
+struct bsg_device *scsi_bsg_register_queue(struct scsi_device *sdev);
extern int scsi_device_max_queue_depth(struct scsi_device *sdev);