git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
drivers
/
usb
/
core
/
buffer.c
diff --git
a/drivers/usb/core/buffer.c
b/drivers/usb/core/buffer.c
index
a649e32
..
c3915dc
100644
(file)
--- 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.
*/
* and should work with all USB controllers, regardles of bus type.
*/
-#include <linux/config.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/slab.h>
@@
-15,14
+14,6
@@
#include <asm/scatterlist.h>
#include <linux/dma-mapping.h>
#include <linux/dmapool.h>
#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"
#include <linux/usb.h>
#include "hcd.h"
@@
-63,6
+54,9
@@
int hcd_buffer_create (struct usb_hcd *hcd)
char name [16];
int i, size;
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;
for (i = 0; i < HCD_BUFFER_POOLS; i++) {
if (!(size = pool_max [i]))
continue;
@@
-76,7
+70,6
@@
int hcd_buffer_create (struct usb_hcd *hcd)
}
return 0;
}
}
return 0;
}
-EXPORT_SYMBOL (hcd_buffer_create);
/**
/**
@@
-94,25
+87,24
@@
void hcd_buffer_destroy (struct usb_hcd *hcd)
struct dma_pool *pool = hcd->pool [i];
if (pool) {
dma_pool_destroy (pool);
struct dma_pool *pool = hcd->pool [i];
if (pool) {
dma_pool_destroy (pool);
- hcd->pool
[i] = 0
;
+ hcd->pool
[i] = NULL
;
}
}
}
}
}
}
-EXPORT_SYMBOL (hcd_buffer_destroy);
-/* sometimes alloc/free could use kmalloc with
SLAB
_DMA, for
+/* sometimes alloc/free could use kmalloc with
GFP
_DMA, for
* better sharing and to leverage mm/slab.c intelligence.
*/
void *hcd_buffer_alloc (
struct usb_bus *bus,
size_t size,
* better sharing and to leverage mm/slab.c intelligence.
*/
void *hcd_buffer_alloc (
struct usb_bus *bus,
size_t size,
-
int
mem_flags,
+
gfp_t
mem_flags,
dma_addr_t *dma
)
{
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 */
int i;
/* some USB hosts just use PIO */
@@
-135,7
+127,7
@@
void hcd_buffer_free (
dma_addr_t dma
)
{
dma_addr_t dma
)
{
- struct usb_hcd *hcd = bus
->hcpriv
;
+ struct usb_hcd *hcd = bus
_to_hcd(bus)
;
int i;
if (!addr)
int i;
if (!addr)