X-Git-Url: https://repo.jachan.dev/linux.git/blobdiff_plain/972421264637b5df168125e157d881c1899519dd..db1a19b38f3a85f475b4ad716c71be133d8ca48e:/drivers/usb/core/buffer.c diff --git a/drivers/usb/core/buffer.c b/drivers/usb/core/buffer.c index 419c9943a7cb..840442a25b61 100644 --- a/drivers/usb/core/buffer.c +++ b/drivers/usb/core/buffer.c @@ -5,7 +5,6 @@ * and should work with all USB controllers, regardles of bus type. */ -#include #include #include #include @@ -55,6 +54,9 @@ int hcd_buffer_create (struct usb_hcd *hcd) char name [16]; int i, size; + if (!hcd->self.controller->dma_mask) + return 0; + for (i = 0; i < HCD_BUFFER_POOLS; i++) { if (!(size = pool_max [i])) continue; @@ -102,7 +104,7 @@ void *hcd_buffer_alloc ( dma_addr_t *dma ) { - struct usb_hcd *hcd = bus->hcpriv; + struct usb_hcd *hcd = bus_to_hcd(bus); int i; /* some USB hosts just use PIO */ @@ -125,7 +127,7 @@ void hcd_buffer_free ( dma_addr_t dma ) { - struct usb_hcd *hcd = bus->hcpriv; + struct usb_hcd *hcd = bus_to_hcd(bus); int i; if (!addr)