scsi: bsg: Move bsg_scsi_ops to drivers/scsi/

Move the SCSI-specific bsg code in the SCSI midlayer instead of in the
common bsg code.  This just keeps the common bsg code block/ and also
allows building it as a module.

Link: https://lore.kernel.org/r/20210724072033.1284840-15-hch@lst.de
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Christoph Hellwig 2021-07-24 09:20:23 +02:00 committed by Martin K. Petersen
parent d52fe8f436
commit 7801104268
10 changed files with 129 additions and 125 deletions

View file

@ -5,8 +5,9 @@
#include <uapi/linux/bsg.h>
struct request;
struct request_queue;
#ifdef CONFIG_BLK_DEV_BSG
#ifdef CONFIG_BLK_DEV_BSG_COMMON
struct bsg_ops {
int (*check_proto)(struct sg_io_v4 *hdr);
int (*fill_hdr)(struct request *rq, struct sg_io_v4 *hdr,
@ -24,16 +25,10 @@ struct bsg_class_device {
int bsg_register_queue(struct request_queue *q, struct device *parent,
const char *name, const struct bsg_ops *ops);
int bsg_scsi_register_queue(struct request_queue *q, struct device *parent);
void bsg_unregister_queue(struct request_queue *q);
#else
static inline int bsg_scsi_register_queue(struct request_queue *q,
struct device *parent)
{
return 0;
}
static inline void bsg_unregister_queue(struct request_queue *q)
{
}
#endif /* CONFIG_BLK_DEV_BSG */
#endif /* CONFIG_BLK_DEV_BSG_COMMON */
#endif /* _LINUX_BSG_H */