diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2011-06-16 14:37:00 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-07-01 17:31:08 -0400 |
commit | 4baa74fe32f330d464d59a00d01980fd16a15ecc (patch) | |
tree | ca94f0dac9e1ec0bb390944e920b4cdd53e588cd /drivers | |
parent | d8a14a85c72faf1bdcbbc12255361aaa9cb79ff5 (diff) |
usb: gadget: remove net2280_set_fifo_mode()
This function has no user in my tree. It looks like it belongs to
net2280 but it somehow morphed into the dummy_hcd. So I remove it
before it spreads into more drivers.
After some digging I figured out that the only user was removed in
|commit 9079e91b5b5a84836e65cdc9128d2602e3beaef2
|Author: David Brownell <david-b@pacbell.net>
|Date: Wed May 7 16:00:36 2008 -0700
|
| USB: serial gadget: cleanup/reorg
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/gadget/dummy_hcd.c | 10 | ||||
-rw-r--r-- | drivers/usb/gadget/net2280.c | 56 |
2 files changed, 0 insertions, 66 deletions
diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c index 865faf0932af..6d189e1b5710 100644 --- a/drivers/usb/gadget/dummy_hcd.c +++ b/drivers/usb/gadget/dummy_hcd.c | |||
@@ -976,16 +976,6 @@ static int dummy_udc_stop(struct usb_gadget_driver *driver) | |||
976 | 976 | ||
977 | #undef is_enabled | 977 | #undef is_enabled |
978 | 978 | ||
979 | /* just declare this in any driver that really need it */ | ||
980 | extern int net2280_set_fifo_mode (struct usb_gadget *gadget, int mode); | ||
981 | |||
982 | int net2280_set_fifo_mode (struct usb_gadget *gadget, int mode) | ||
983 | { | ||
984 | return -ENOSYS; | ||
985 | } | ||
986 | EXPORT_SYMBOL (net2280_set_fifo_mode); | ||
987 | |||
988 | |||
989 | /* The gadget structure is stored inside the hcd structure and will be | 979 | /* The gadget structure is stored inside the hcd structure and will be |
990 | * released along with it. */ | 980 | * released along with it. */ |
991 | static void | 981 | static void |
diff --git a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c index 1e6ea6f26507..3dd40b4e675c 100644 --- a/drivers/usb/gadget/net2280.c +++ b/drivers/usb/gadget/net2280.c | |||
@@ -1744,62 +1744,6 @@ static void set_fifo_mode (struct net2280 *dev, int mode) | |||
1744 | list_add_tail (&dev->ep [6].ep.ep_list, &dev->gadget.ep_list); | 1744 | list_add_tail (&dev->ep [6].ep.ep_list, &dev->gadget.ep_list); |
1745 | } | 1745 | } |
1746 | 1746 | ||
1747 | /* just declare this in any driver that really need it */ | ||
1748 | extern int net2280_set_fifo_mode (struct usb_gadget *gadget, int mode); | ||
1749 | |||
1750 | /** | ||
1751 | * net2280_set_fifo_mode - change allocation of fifo buffers | ||
1752 | * @gadget: access to the net2280 device that will be updated | ||
1753 | * @mode: 0 for default, four 1kB buffers (ep-a through ep-d); | ||
1754 | * 1 for two 2kB buffers (ep-a and ep-b only); | ||
1755 | * 2 for one 2kB buffer (ep-a) and two 1kB ones (ep-b, ep-c). | ||
1756 | * | ||
1757 | * returns zero on success, else negative errno. when this succeeds, | ||
1758 | * the contents of gadget->ep_list may have changed. | ||
1759 | * | ||
1760 | * you may only call this function when endpoints a-d are all disabled. | ||
1761 | * use it whenever extra hardware buffering can help performance, such | ||
1762 | * as before enabling "high bandwidth" interrupt endpoints that use | ||
1763 | * maxpacket bigger than 512 (when double buffering would otherwise | ||
1764 | * be unavailable). | ||
1765 | */ | ||
1766 | int net2280_set_fifo_mode (struct usb_gadget *gadget, int mode) | ||
1767 | { | ||
1768 | int i; | ||
1769 | struct net2280 *dev; | ||
1770 | int status = 0; | ||
1771 | unsigned long flags; | ||
1772 | |||
1773 | if (!gadget) | ||
1774 | return -ENODEV; | ||
1775 | dev = container_of (gadget, struct net2280, gadget); | ||
1776 | |||
1777 | spin_lock_irqsave (&dev->lock, flags); | ||
1778 | |||
1779 | for (i = 1; i <= 4; i++) | ||
1780 | if (dev->ep [i].desc) { | ||
1781 | status = -EINVAL; | ||
1782 | break; | ||
1783 | } | ||
1784 | if (mode < 0 || mode > 2) | ||
1785 | status = -EINVAL; | ||
1786 | if (status == 0) | ||
1787 | set_fifo_mode (dev, mode); | ||
1788 | spin_unlock_irqrestore (&dev->lock, flags); | ||
1789 | |||
1790 | if (status == 0) { | ||
1791 | if (mode == 1) | ||
1792 | DEBUG (dev, "fifo: ep-a 2K, ep-b 2K\n"); | ||
1793 | else if (mode == 2) | ||
1794 | DEBUG (dev, "fifo: ep-a 2K, ep-b 1K, ep-c 1K\n"); | ||
1795 | /* else all are 1K */ | ||
1796 | } | ||
1797 | return status; | ||
1798 | } | ||
1799 | EXPORT_SYMBOL (net2280_set_fifo_mode); | ||
1800 | |||
1801 | /*-------------------------------------------------------------------------*/ | ||
1802 | |||
1803 | /* keeping it simple: | 1747 | /* keeping it simple: |
1804 | * - one bus driver, initted first; | 1748 | * - one bus driver, initted first; |
1805 | * - one function driver, initted second | 1749 | * - one function driver, initted second |