]> git.baikalelectronics.ru Git - kernel.git/commit
usb: core: Allow compilation on platforms where NO_DMA=y
authorGeert Uytterhoeven <geert@linux-m68k.org>
Tue, 16 Feb 2016 15:10:57 +0000 (16:10 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 21 Feb 2016 04:22:55 +0000 (20:22 -0800)
commitfa26e0ae8e42eb3c356036796e000040540d826b
tree0eb8d890ab2985385f5eba7ea21759b54b043503
parentc8e6650168966b44aa01945a9d5c62222fa53b33
usb: core: Allow compilation on platforms where NO_DMA=y

Some platforms don't have DMA, but we should still be able to build USB
drivers for these platforms. They could still be used through vhci_hcd,
usbip_host, or maybe something like USB passthrough in UML from a
capable host.

If NO_DMA=y:

    ERROR: "dma_pool_destroy" [drivers/usb/core/usbcore.ko] undefined!
    ERROR: "bad_dma_ops" [drivers/usb/core/usbcore.ko] undefined!
    ERROR: "dma_pool_free" [drivers/usb/core/usbcore.ko] undefined!
    ERROR: "dma_pool_alloc" [drivers/usb/core/usbcore.ko] undefined!
    ERROR: "dma_pool_create" [drivers/usb/core/usbcore.ko] undefined!

Add a few checks for CONFIG_HAS_DMA to fix this.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/buffer.c
drivers/usb/core/hcd.c