diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-05 20:23:24 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-05 20:23:24 +0300 |
commit | 652ede37cec0bf7313927ecf4cebf0e79a0619f2 (patch) | |
tree | 0632532df17bf40af0112faefb8bfa6f2ded315e /include/linux/usb | |
parent | 1b2951dd99af3970c1c1a8385a12b90236b837de (diff) | |
parent | 1f674e16f9ce6eb20ee2e81ae7514737376874de (diff) | |
download | linux-652ede37cec0bf7313927ecf4cebf0e79a0619f2.tar.xz |
Merge tag 'dma-mapping-4.17' of git://git.infradead.org/users/hch/dma-mapping
Pull dma-mapping updates from Christoph Hellwig:
"Very light this round as the interesting dma mapping changes went
through the x86 tree.
This just provides proper stubs for architectures not supporting dma
(Geert Uytterhoeven)"
* tag 'dma-mapping-4.17' of git://git.infradead.org/users/hch/dma-mapping:
usb: gadget: Add NO_DMA dummies for DMA mapping API
scsi: Add NO_DMA dummies for SCSI DMA mapping API
mm: Add NO_DMA dummies for DMA pool API
dma-coherent: Add NO_DMA dummies for managed DMA API
dma-mapping: Convert NO_DMA get_dma_ops() into a real dummy
Diffstat (limited to 'include/linux/usb')
-rw-r--r-- | include/linux/usb/gadget.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index e3424234b23a..847f423ad9b3 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h @@ -806,6 +806,7 @@ int usb_otg_descriptor_init(struct usb_gadget *gadget, /* utility to simplify map/unmap of usb_requests to/from DMA */ +#ifdef CONFIG_HAS_DMA extern int usb_gadget_map_request_by_dev(struct device *dev, struct usb_request *req, int is_in); extern int usb_gadget_map_request(struct usb_gadget *gadget, @@ -815,6 +816,17 @@ extern void usb_gadget_unmap_request_by_dev(struct device *dev, struct usb_request *req, int is_in); extern void usb_gadget_unmap_request(struct usb_gadget *gadget, struct usb_request *req, int is_in); +#else /* !CONFIG_HAS_DMA */ +static inline int usb_gadget_map_request_by_dev(struct device *dev, + struct usb_request *req, int is_in) { return -ENOSYS; } +static inline int usb_gadget_map_request(struct usb_gadget *gadget, + struct usb_request *req, int is_in) { return -ENOSYS; } + +static inline void usb_gadget_unmap_request_by_dev(struct device *dev, + struct usb_request *req, int is_in) { } +static inline void usb_gadget_unmap_request(struct usb_gadget *gadget, + struct usb_request *req, int is_in) { } +#endif /* !CONFIG_HAS_DMA */ /*-------------------------------------------------------------------------*/ |