From: Chris Humbert Date: Mon, 28 Nov 2005 17:29:23 +0000 (-0800) Subject: [PATCH] USB: don't allocate dma pools for PIO HCDs X-Git-Tag: v2.6.16-rc1~474^2~22^2~10^2~39 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=bd39b7f195e5a780a3c6710eb1c1450f158a1f31;p=linux-2.6-omap-h63xx.git [PATCH] USB: don't allocate dma pools for PIO HCDs USB: don't allocate dma pools for PIO HCDs hcd_buffer_alloc() and hcd_buffer_free() have a similar dma_mask check and revert to kmalloc()/kfree(), but hcd_buffer_create() doesn't check dma_mask and allocates unused dma pools. Signed-off-by: Chris Humbert Acked-by: David Brownell Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/core/buffer.c b/drivers/usb/core/buffer.c index 419c9943a7c..ad742cec94f 100644 --- a/drivers/usb/core/buffer.c +++ b/drivers/usb/core/buffer.c @@ -55,6 +55,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;