diff options
author | David Woodhouse <dwmw2@infradead.org> | 2007-07-23 10:20:10 +0100 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2007-07-23 10:20:10 +0100 |
commit | 39fe5434cb9de5da40510028b17b96bc4eb312b3 (patch) | |
tree | 7a02a317b9ad57da51ca99887c119e779ccf3f13 /drivers/usb/gadget/dummy_hcd.c | |
parent | 0fc72b81d3111d114ab378935b1cf07680ca1289 (diff) | |
parent | f695baf2df9e0413d3521661070103711545207a (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/usb/gadget/dummy_hcd.c')
-rw-r--r-- | drivers/usb/gadget/dummy_hcd.c | 39 |
1 files changed, 1 insertions, 38 deletions
diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c index fcb5526cb08..f2fbdc7fe37 100644 --- a/drivers/usb/gadget/dummy_hcd.c +++ b/drivers/usb/gadget/dummy_hcd.c @@ -497,38 +497,6 @@ dummy_free_request (struct usb_ep *_ep, struct usb_request *_req) kfree (req); } -static void * -dummy_alloc_buffer ( - struct usb_ep *_ep, - unsigned bytes, - dma_addr_t *dma, - gfp_t mem_flags -) { - char *retval; - struct dummy_ep *ep; - struct dummy *dum; - - ep = usb_ep_to_dummy_ep (_ep); - dum = ep_to_dummy (ep); - - if (!dum->driver) - return NULL; - retval = kmalloc (bytes, mem_flags); - *dma = (dma_addr_t) retval; - return retval; -} - -static void -dummy_free_buffer ( - struct usb_ep *_ep, - void *buf, - dma_addr_t dma, - unsigned bytes -) { - if (bytes) - kfree (buf); -} - static void fifo_complete (struct usb_ep *ep, struct usb_request *req) { @@ -659,10 +627,6 @@ static const struct usb_ep_ops dummy_ep_ops = { .alloc_request = dummy_alloc_request, .free_request = dummy_free_request, - .alloc_buffer = dummy_alloc_buffer, - .free_buffer = dummy_free_buffer, - /* map, unmap, ... eventually hook the "generic" dma calls */ - .queue = dummy_queue, .dequeue = dummy_dequeue, @@ -1784,8 +1748,7 @@ static int dummy_bus_resume (struct usb_hcd *hcd) spin_lock_irq (&dum->lock); if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags)) { - dev_warn (&hcd->self.root_hub->dev, "HC isn't running!\n"); - rc = -ENODEV; + rc = -ESHUTDOWN; } else { dum->rh_state = DUMMY_RH_RUNNING; set_link_state (dum); |