Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / drivers / usb / core / buffer.c
index b7827df..ad742ce 100644 (file)
 #include <asm/scatterlist.h>
 #include <linux/dma-mapping.h>
 #include <linux/dmapool.h>
-
-
-#ifdef CONFIG_USB_DEBUG
-       #define DEBUG
-#else
-       #undef DEBUG
-#endif
-
 #include <linux/usb.h>
 #include "hcd.h"
 
@@ -63,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;
@@ -106,7 +101,7 @@ void hcd_buffer_destroy (struct usb_hcd *hcd)
 void *hcd_buffer_alloc (
        struct usb_bus          *bus,
        size_t                  size,
-       int                     mem_flags,
+       gfp_t                   mem_flags,
        dma_addr_t              *dma
 )
 {