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/gmidi.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/gmidi.c')
-rw-r--r-- | drivers/usb/gadget/gmidi.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/usb/gadget/gmidi.c b/drivers/usb/gadget/gmidi.c index d08a8d0e6427..1c5aa49d7432 100644 --- a/drivers/usb/gadget/gmidi.c +++ b/drivers/usb/gadget/gmidi.c | |||
@@ -1248,17 +1248,11 @@ autoconf_fail: | |||
1248 | tasklet_init(&dev->tasklet, gmidi_in_tasklet, (unsigned long)dev); | 1248 | tasklet_init(&dev->tasklet, gmidi_in_tasklet, (unsigned long)dev); |
1249 | 1249 | ||
1250 | /* preallocate control response and buffer */ | 1250 | /* preallocate control response and buffer */ |
1251 | dev->req = usb_ep_alloc_request(gadget->ep0, GFP_KERNEL); | 1251 | dev->req = alloc_ep_req(gadget->ep0, USB_BUFSIZ); |
1252 | if (!dev->req) { | 1252 | if (!dev->req) { |
1253 | err = -ENOMEM; | 1253 | err = -ENOMEM; |
1254 | goto fail; | 1254 | goto fail; |
1255 | } | 1255 | } |
1256 | dev->req->buf = usb_ep_alloc_buffer(gadget->ep0, USB_BUFSIZ, | ||
1257 | &dev->req->dma, GFP_KERNEL); | ||
1258 | if (!dev->req->buf) { | ||
1259 | err = -ENOMEM; | ||
1260 | goto fail; | ||
1261 | } | ||
1262 | 1256 | ||
1263 | dev->req->complete = gmidi_setup_complete; | 1257 | dev->req->complete = gmidi_setup_complete; |
1264 | 1258 | ||