summaryrefslogtreecommitdiff
path: root/include/scsi/scsi_cmnd.h
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2018-03-16 16:25:44 +0300
committerChristoph Hellwig <hch@lst.de>2018-03-16 21:58:28 +0300
commitbff739b6559e2fcec37cd0465c7aa37663f4baeb (patch)
treeb93dd685f674fead91c6506a4183d94d2119fb9e /include/scsi/scsi_cmnd.h
parentc1ce6c2beea38171a57c56e55875318cef9a2ad5 (diff)
downloadlinux-bff739b6559e2fcec37cd0465c7aa37663f4baeb.tar.xz
scsi: Add NO_DMA dummies for SCSI DMA mapping API
Add dummies for scsi_dma_{,un}map(), to allow compile-testing if NO_DMA=y. This prevents the following from showing up later: ERROR: "scsi_dma_unmap" [drivers/firewire/firewire-sbp2.ko] undefined! ERROR: "scsi_dma_map" [drivers/firewire/firewire-sbp2.ko] undefined! Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Mark Brown <broonie@kernel.org> Acked-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'include/scsi/scsi_cmnd.h')
-rw-r--r--include/scsi/scsi_cmnd.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h
index 2280b2351739..aaf1e971c6a3 100644
--- a/include/scsi/scsi_cmnd.h
+++ b/include/scsi/scsi_cmnd.h
@@ -174,8 +174,13 @@ extern void scsi_kunmap_atomic_sg(void *virt);
extern int scsi_init_io(struct scsi_cmnd *cmd);
+#ifdef CONFIG_SCSI_DMA
extern int scsi_dma_map(struct scsi_cmnd *cmd);
extern void scsi_dma_unmap(struct scsi_cmnd *cmd);
+#else /* !CONFIG_SCSI_DMA */
+static inline int scsi_dma_map(struct scsi_cmnd *cmd) { return -ENOSYS; }
+static inline void scsi_dma_unmap(struct scsi_cmnd *cmd) { }
+#endif /* !CONFIG_SCSI_DMA */
static inline unsigned scsi_sg_count(struct scsi_cmnd *cmd)
{