usb: xhci: add missing dma-mapping.h includes
Subsystems (2)
PATCH 1/1 usb: xhci: add missing dma-mapping.h includes
A randconfig build hit the following build errors because xhci.c and xhci-mem.c use dma mapping functions but don't include <linux/dma-mapping.h>. Add the missing includes to fix the build errors.
drivers/usb/host/xhci.c In function 'xhci_gen_setup':drivers/usb/host/xhci.c +4872 : error: implicit declaration of function 'dma_set_mask' drivers/usb/host/xhci.c +4872 : error: implicit declaration of function 'DMA_BIT_MASK'
drivers/usb/host/xhci-mem.c In function 'xhci_free_stream_ctx':drivers/usb/host/xhci-mem.c +435 : error: implicit declaration of function 'dma_free_coherent' drivers/usb/host/xhci-mem.c In function 'xhci_alloc_stream_ctx':drivers/usb/host/xhci-mem.c +463 : error: implicit declaration of function 'dma_alloc_coherent'
--- drivers/usb/host/xhci-mem.c | 1 + drivers/usb/host/xhci.c | 1 + 2 files changed, 2 insertions(+)
drivers/usb/host/xhci-mem.c +1 -0
@@ -24,6 +24,7 @@#include <linux/pci.h> #include <linux/slab.h> #include <linux/dmapool.h> +#include <linux/dma-mapping.h> #include "xhci.h"
drivers/usb/host/xhci.c +1 -0
@@ -27,6 +27,7 @@#include <linux/moduleparam.h> #include <linux/slab.h> #include <linux/dmi.h> +#include <linux/dma-mapping.h> #include "xhci.h"
Signature · 1 line
1.8.1.2
Thanks for the patch James! I'll send it off to Greg in a couple days.
Sarah Sharp
Quoted 50 lines · James Hogan
A randconfig build hit the following build errors because
xhci.candxhci-mem.cuse dma mapping functions but don't include <linux/dma-mapping.h>. Add the missing includes to fix the build errors.
drivers/usb/host/xhci.cIn function 'xhci_gen_setup':drivers/usb/host/xhci.c+4872 : error: implicit declaration of function 'dma_set_mask'drivers/usb/host/xhci.c+4872 : error: implicit declaration of function 'DMA_BIT_MASK'
drivers/usb/host/xhci-mem.cIn function 'xhci_free_stream_ctx':drivers/usb/host/xhci-mem.c+435 : error: implicit declaration of function 'dma_free_coherent'drivers/usb/host/xhci-mem.cIn function 'xhci_alloc_stream_ctx':drivers/usb/host/xhci-mem.c+463 : error: implicit declaration of function 'dma_alloc_coherent'Signed-off-by James Hogan <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Sarah Sharp <[email protected]>--- drivers/usb/host/xhci-mem.c | 1 + drivers/usb/host/xhci.c | 1 + 2 files changed, 2 insertions(+)drivers/usb/host/xhci-mem.c +1
-0@@ -24,6 +24,7 @@#include <linux/pci.h> #include <linux/slab.h> #include <linux/dmapool.h> +#include <linux/dma-mapping.h> #include "xhci.h" drivers/usb/host/xhci.c +1
-0@@ -27,6 +27,7 @@#include <linux/moduleparam.h> #include <linux/slab.h> #include <linux/dmi.h> +#include <linux/dma-mapping.h> #include "xhci.h" Signature · 1 line
1.8.1.2