aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/dummy_hcd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/gadget/dummy_hcd.c')
-rw-r--r--drivers/usb/gadget/dummy_hcd.c39
1 files changed, 1 insertions, 38 deletions
diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c
index fcb5526cb085..f2fbdc7fe376 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)
497 kfree (req); 497 kfree (req);
498} 498}
499 499
500static void *
501dummy_alloc_buffer (
502 struct usb_ep *_ep,
503 unsigned bytes,
504 dma_addr_t *dma,
505 gfp_t mem_flags
506) {
507 char *retval;
508 struct dummy_ep *ep;
509 struct dummy *dum;
510
511 ep = usb_ep_to_dummy_ep (_ep);
512 dum = ep_to_dummy (ep);
513
514 if (!dum->driver)
515 return NULL;
516 retval = kmalloc (bytes, mem_flags);
517 *dma = (dma_addr_t) retval;
518 return retval;
519}
520
521static void
522dummy_free_buffer (
523 struct usb_ep *_ep,
524 void *buf,
525 dma_addr_t dma,
526 unsigned bytes
527) {
528 if (bytes)
529 kfree (buf);
530}
531
532static void 500static void
533fifo_complete (struct usb_ep *ep, struct usb_request *req) 501fifo_complete (struct usb_ep *ep, struct usb_request *req)
534{ 502{
@@ -659,10 +627,6 @@ static const struct usb_ep_ops dummy_ep_ops = {
659 .alloc_request = dummy_alloc_request, 627 .alloc_request = dummy_alloc_request,
660 .free_request = dummy_free_request, 628 .free_request = dummy_free_request,
661 629
662 .alloc_buffer = dummy_alloc_buffer,
663 .free_buffer = dummy_free_buffer,
664 /* map, unmap, ... eventually hook the "generic" dma calls */
665
666 .queue = dummy_queue, 630 .queue = dummy_queue,
667 .dequeue = dummy_dequeue, 631 .dequeue = dummy_dequeue,
668 632
@@ -1784,8 +1748,7 @@ static int dummy_bus_resume (struct usb_hcd *hcd)
1784 1748
1785 spin_lock_irq (&dum->lock); 1749 spin_lock_irq (&dum->lock);
1786 if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags)) { 1750 if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags)) {
1787 dev_warn (&hcd->self.root_hub->dev, "HC isn't running!\n"); 1751 rc = -ESHUTDOWN;
1788 rc = -ENODEV;
1789 } else { 1752 } else {
1790 dum->rh_state = DUMMY_RH_RUNNING; 1753 dum->rh_state = DUMMY_RH_RUNNING;
1791 set_link_state (dum); 1754 set_link_state (dum);