diff options
author | David Brownell <david-b@pacbell.net> | 2007-07-01 14:04:54 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-07-12 19:34:42 -0400 |
commit | 9d8bab58b758cd5a96d368a8cc64111c9ab50407 (patch) | |
tree | 710695adf1e50f2e4680c130d548ccd3e6251630 /drivers/usb/gadget/inode.c | |
parent | ad8c623f4f48085edd51c7f4cdfd10295547bf45 (diff) |
usb gadget stack: remove usb_ep_*_buffer(), part 1
Remove usb_ep_{alloc,free}_buffer() calls, for small dma-coherent buffers.
This patch just removes the interface and its users; later patches will
remove controller driver support.
- This interface is invariably not implemented correctly in the
controller drivers (e.g. using dma pools, a mechanism which
post-dates the interface by several years).
- At this point no gadget driver really *needs* to use it. In
current kernels, any driver that needs such a mechanism could
allocate a dma pool themselves.
Removing this interface is thus a simplification and improvement.
Note that the gmidi.c driver had a bug in this area; fixed.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/inode.c')
-rw-r--r-- | drivers/usb/gadget/inode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c index f723e083c9d0..e60745ffaf8e 100644 --- a/drivers/usb/gadget/inode.c +++ b/drivers/usb/gadget/inode.c | |||
@@ -923,7 +923,7 @@ static void clean_req (struct usb_ep *ep, struct usb_request *req) | |||
923 | struct dev_data *dev = ep->driver_data; | 923 | struct dev_data *dev = ep->driver_data; |
924 | 924 | ||
925 | if (req->buf != dev->rbuf) { | 925 | if (req->buf != dev->rbuf) { |
926 | usb_ep_free_buffer (ep, req->buf, req->dma, req->length); | 926 | kfree(req->buf); |
927 | req->buf = dev->rbuf; | 927 | req->buf = dev->rbuf; |
928 | req->dma = DMA_ADDR_INVALID; | 928 | req->dma = DMA_ADDR_INVALID; |
929 | } | 929 | } |
@@ -963,7 +963,7 @@ static int setup_req (struct usb_ep *ep, struct usb_request *req, u16 len) | |||
963 | return -EBUSY; | 963 | return -EBUSY; |
964 | } | 964 | } |
965 | if (len > sizeof (dev->rbuf)) | 965 | if (len > sizeof (dev->rbuf)) |
966 | req->buf = usb_ep_alloc_buffer (ep, len, &req->dma, GFP_ATOMIC); | 966 | req->buf = kmalloc(len, GFP_ATOMIC); |
967 | if (req->buf == 0) { | 967 | if (req->buf == 0) { |
968 | req->buf = dev->rbuf; | 968 | req->buf = dev->rbuf; |
969 | return -ENOMEM; | 969 | return -ENOMEM; |