diff options
Diffstat (limited to 'drivers/usb/gadget/ether.c')
-rw-r--r-- | drivers/usb/gadget/ether.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index 5bb53ae88969..8509e955007d 100644 --- a/drivers/usb/gadget/ether.c +++ b/drivers/usb/gadget/ether.c | |||
@@ -945,15 +945,16 @@ config_buf (enum usb_device_speed speed, | |||
945 | 945 | ||
946 | /*-------------------------------------------------------------------------*/ | 946 | /*-------------------------------------------------------------------------*/ |
947 | 947 | ||
948 | static void eth_start (struct eth_dev *dev, int gfp_flags); | 948 | static void eth_start (struct eth_dev *dev, unsigned gfp_flags); |
949 | static int alloc_requests (struct eth_dev *dev, unsigned n, int gfp_flags); | 949 | static int alloc_requests (struct eth_dev *dev, unsigned n, unsigned gfp_flags); |
950 | 950 | ||
951 | static int | 951 | static int |
952 | set_ether_config (struct eth_dev *dev, int gfp_flags) | 952 | set_ether_config (struct eth_dev *dev, unsigned gfp_flags) |
953 | { | 953 | { |
954 | int result = 0; | 954 | int result = 0; |
955 | struct usb_gadget *gadget = dev->gadget; | 955 | struct usb_gadget *gadget = dev->gadget; |
956 | 956 | ||
957 | #if defined(DEV_CONFIG_CDC) || defined(CONFIG_USB_ETH_RNDIS) | ||
957 | /* status endpoint used for RNDIS and (optionally) CDC */ | 958 | /* status endpoint used for RNDIS and (optionally) CDC */ |
958 | if (!subset_active(dev) && dev->status_ep) { | 959 | if (!subset_active(dev) && dev->status_ep) { |
959 | dev->status = ep_desc (gadget, &hs_status_desc, | 960 | dev->status = ep_desc (gadget, &hs_status_desc, |
@@ -967,6 +968,7 @@ set_ether_config (struct eth_dev *dev, int gfp_flags) | |||
967 | goto done; | 968 | goto done; |
968 | } | 969 | } |
969 | } | 970 | } |
971 | #endif | ||
970 | 972 | ||
971 | dev->in = ep_desc (dev->gadget, &hs_source_desc, &fs_source_desc); | 973 | dev->in = ep_desc (dev->gadget, &hs_source_desc, &fs_source_desc); |
972 | dev->in_ep->driver_data = dev; | 974 | dev->in_ep->driver_data = dev; |
@@ -1079,7 +1081,7 @@ static void eth_reset_config (struct eth_dev *dev) | |||
1079 | * that returns config descriptors, and altsetting code. | 1081 | * that returns config descriptors, and altsetting code. |
1080 | */ | 1082 | */ |
1081 | static int | 1083 | static int |
1082 | eth_set_config (struct eth_dev *dev, unsigned number, int gfp_flags) | 1084 | eth_set_config (struct eth_dev *dev, unsigned number, unsigned gfp_flags) |
1083 | { | 1085 | { |
1084 | int result = 0; | 1086 | int result = 0; |
1085 | struct usb_gadget *gadget = dev->gadget; | 1087 | struct usb_gadget *gadget = dev->gadget; |
@@ -1596,7 +1598,7 @@ static void defer_kevent (struct eth_dev *dev, int flag) | |||
1596 | static void rx_complete (struct usb_ep *ep, struct usb_request *req); | 1598 | static void rx_complete (struct usb_ep *ep, struct usb_request *req); |
1597 | 1599 | ||
1598 | static int | 1600 | static int |
1599 | rx_submit (struct eth_dev *dev, struct usb_request *req, int gfp_flags) | 1601 | rx_submit (struct eth_dev *dev, struct usb_request *req, unsigned gfp_flags) |
1600 | { | 1602 | { |
1601 | struct sk_buff *skb; | 1603 | struct sk_buff *skb; |
1602 | int retval = -ENOMEM; | 1604 | int retval = -ENOMEM; |
@@ -1722,7 +1724,7 @@ clean: | |||
1722 | } | 1724 | } |
1723 | 1725 | ||
1724 | static int prealloc (struct list_head *list, struct usb_ep *ep, | 1726 | static int prealloc (struct list_head *list, struct usb_ep *ep, |
1725 | unsigned n, int gfp_flags) | 1727 | unsigned n, unsigned gfp_flags) |
1726 | { | 1728 | { |
1727 | unsigned i; | 1729 | unsigned i; |
1728 | struct usb_request *req; | 1730 | struct usb_request *req; |
@@ -1761,7 +1763,7 @@ extra: | |||
1761 | return 0; | 1763 | return 0; |
1762 | } | 1764 | } |
1763 | 1765 | ||
1764 | static int alloc_requests (struct eth_dev *dev, unsigned n, int gfp_flags) | 1766 | static int alloc_requests (struct eth_dev *dev, unsigned n, unsigned gfp_flags) |
1765 | { | 1767 | { |
1766 | int status; | 1768 | int status; |
1767 | 1769 | ||
@@ -1777,7 +1779,7 @@ fail: | |||
1777 | return status; | 1779 | return status; |
1778 | } | 1780 | } |
1779 | 1781 | ||
1780 | static void rx_fill (struct eth_dev *dev, int gfp_flags) | 1782 | static void rx_fill (struct eth_dev *dev, unsigned gfp_flags) |
1781 | { | 1783 | { |
1782 | struct usb_request *req; | 1784 | struct usb_request *req; |
1783 | unsigned long flags; | 1785 | unsigned long flags; |
@@ -2022,7 +2024,7 @@ static int rndis_control_ack (struct net_device *net) | |||
2022 | 2024 | ||
2023 | #endif /* RNDIS */ | 2025 | #endif /* RNDIS */ |
2024 | 2026 | ||
2025 | static void eth_start (struct eth_dev *dev, int gfp_flags) | 2027 | static void eth_start (struct eth_dev *dev, unsigned gfp_flags) |
2026 | { | 2028 | { |
2027 | DEBUG (dev, "%s\n", __FUNCTION__); | 2029 | DEBUG (dev, "%s\n", __FUNCTION__); |
2028 | 2030 | ||
@@ -2428,7 +2430,7 @@ autoconf_fail: | |||
2428 | dev->req->complete = eth_setup_complete; | 2430 | dev->req->complete = eth_setup_complete; |
2429 | 2431 | ||
2430 | /* ... and maybe likewise for status transfer */ | 2432 | /* ... and maybe likewise for status transfer */ |
2431 | #ifdef DEV_CONFIG_CDC | 2433 | #if defined(DEV_CONFIG_CDC) || defined(CONFIG_USB_ETH_RNDIS) |
2432 | if (dev->status_ep) { | 2434 | if (dev->status_ep) { |
2433 | dev->stat_req = eth_req_alloc (dev->status_ep, | 2435 | dev->stat_req = eth_req_alloc (dev->status_ep, |
2434 | STATUS_BYTECOUNT, GFP_KERNEL); | 2436 | STATUS_BYTECOUNT, GFP_KERNEL); |