diff options
| -rw-r--r-- | drivers/usb/gadget/composite.c | 21 | ||||
| -rw-r--r-- | drivers/usb/gadget/config.c | 4 | ||||
| -rw-r--r-- | drivers/usb/gadget/epautoconf.c | 12 | ||||
| -rw-r--r-- | drivers/usb/gadget/f_acm.c | 32 | ||||
| -rw-r--r-- | drivers/usb/gadget/f_ecm.c | 33 | ||||
| -rw-r--r-- | drivers/usb/gadget/f_mass_storage.c | 2 | ||||
| -rw-r--r-- | drivers/usb/gadget/f_rndis.c | 33 | ||||
| -rw-r--r-- | drivers/usb/gadget/u_ether.c | 4 |
8 files changed, 71 insertions, 70 deletions
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index f9aff1bbcb3e..dd6d1905c148 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c | |||
| @@ -85,7 +85,7 @@ MODULE_PARM_DESC(iSerialNumber, "SerialNumber string"); | |||
| 85 | * This function returns the value of the function's bind(), which is | 85 | * This function returns the value of the function's bind(), which is |
| 86 | * zero for success else a negative errno value. | 86 | * zero for success else a negative errno value. |
| 87 | */ | 87 | */ |
| 88 | int __init usb_add_function(struct usb_configuration *config, | 88 | int usb_add_function(struct usb_configuration *config, |
| 89 | struct usb_function *function) | 89 | struct usb_function *function) |
| 90 | { | 90 | { |
| 91 | int value = -EINVAL; | 91 | int value = -EINVAL; |
| @@ -215,7 +215,7 @@ int usb_function_activate(struct usb_function *function) | |||
| 215 | * Returns the interface ID which was allocated; or -ENODEV if no | 215 | * Returns the interface ID which was allocated; or -ENODEV if no |
| 216 | * more interface IDs can be allocated. | 216 | * more interface IDs can be allocated. |
| 217 | */ | 217 | */ |
| 218 | int __init usb_interface_id(struct usb_configuration *config, | 218 | int usb_interface_id(struct usb_configuration *config, |
| 219 | struct usb_function *function) | 219 | struct usb_function *function) |
| 220 | { | 220 | { |
| 221 | unsigned id = config->next_interface_id; | 221 | unsigned id = config->next_interface_id; |
| @@ -480,7 +480,7 @@ done: | |||
| 480 | * assigns global resources including string IDs, and per-configuration | 480 | * assigns global resources including string IDs, and per-configuration |
| 481 | * resources such as interface IDs and endpoints. | 481 | * resources such as interface IDs and endpoints. |
| 482 | */ | 482 | */ |
| 483 | int __init usb_add_config(struct usb_composite_dev *cdev, | 483 | int usb_add_config(struct usb_composite_dev *cdev, |
| 484 | struct usb_configuration *config) | 484 | struct usb_configuration *config) |
| 485 | { | 485 | { |
| 486 | int status = -EINVAL; | 486 | int status = -EINVAL; |
| @@ -677,7 +677,7 @@ static int get_string(struct usb_composite_dev *cdev, | |||
| 677 | * ensure that for example different functions don't wrongly assign | 677 | * ensure that for example different functions don't wrongly assign |
| 678 | * different meanings to the same identifier. | 678 | * different meanings to the same identifier. |
| 679 | */ | 679 | */ |
| 680 | int __init usb_string_id(struct usb_composite_dev *cdev) | 680 | int usb_string_id(struct usb_composite_dev *cdev) |
| 681 | { | 681 | { |
| 682 | if (cdev->next_string_id < 254) { | 682 | if (cdev->next_string_id < 254) { |
| 683 | /* string id 0 is reserved */ | 683 | /* string id 0 is reserved */ |
| @@ -910,7 +910,7 @@ static ssize_t composite_show_suspended(struct device *dev, | |||
| 910 | 910 | ||
| 911 | static DEVICE_ATTR(suspended, 0444, composite_show_suspended, NULL); | 911 | static DEVICE_ATTR(suspended, 0444, composite_show_suspended, NULL); |
| 912 | 912 | ||
| 913 | static void /* __init_or_exit */ | 913 | static void |
| 914 | composite_unbind(struct usb_gadget *gadget) | 914 | composite_unbind(struct usb_gadget *gadget) |
| 915 | { | 915 | { |
| 916 | struct usb_composite_dev *cdev = get_gadget_data(gadget); | 916 | struct usb_composite_dev *cdev = get_gadget_data(gadget); |
| @@ -960,7 +960,7 @@ composite_unbind(struct usb_gadget *gadget) | |||
| 960 | composite = NULL; | 960 | composite = NULL; |
| 961 | } | 961 | } |
| 962 | 962 | ||
| 963 | static void __init | 963 | static void |
| 964 | string_override_one(struct usb_gadget_strings *tab, u8 id, const char *s) | 964 | string_override_one(struct usb_gadget_strings *tab, u8 id, const char *s) |
| 965 | { | 965 | { |
| 966 | struct usb_string *str = tab->strings; | 966 | struct usb_string *str = tab->strings; |
| @@ -973,7 +973,7 @@ string_override_one(struct usb_gadget_strings *tab, u8 id, const char *s) | |||
| 973 | } | 973 | } |
| 974 | } | 974 | } |
| 975 | 975 | ||
| 976 | static void __init | 976 | static void |
| 977 | string_override(struct usb_gadget_strings **tab, u8 id, const char *s) | 977 | string_override(struct usb_gadget_strings **tab, u8 id, const char *s) |
| 978 | { | 978 | { |
| 979 | while (*tab) { | 979 | while (*tab) { |
| @@ -982,7 +982,7 @@ string_override(struct usb_gadget_strings **tab, u8 id, const char *s) | |||
| 982 | } | 982 | } |
| 983 | } | 983 | } |
| 984 | 984 | ||
| 985 | static int __init composite_bind(struct usb_gadget *gadget) | 985 | static int composite_bind(struct usb_gadget *gadget) |
| 986 | { | 986 | { |
| 987 | struct usb_composite_dev *cdev; | 987 | struct usb_composite_dev *cdev; |
| 988 | int status = -ENOMEM; | 988 | int status = -ENOMEM; |
| @@ -1113,7 +1113,6 @@ static struct usb_gadget_driver composite_driver = { | |||
| 1113 | .speed = USB_SPEED_HIGH, | 1113 | .speed = USB_SPEED_HIGH, |
| 1114 | 1114 | ||
| 1115 | .bind = composite_bind, | 1115 | .bind = composite_bind, |
| 1116 | /* .unbind = __exit_p(composite_unbind), */ | ||
| 1117 | .unbind = composite_unbind, | 1116 | .unbind = composite_unbind, |
| 1118 | 1117 | ||
| 1119 | .setup = composite_setup, | 1118 | .setup = composite_setup, |
| @@ -1142,7 +1141,7 @@ static struct usb_gadget_driver composite_driver = { | |||
| 1142 | * while it was binding. That would usually be done in order to wait for | 1141 | * while it was binding. That would usually be done in order to wait for |
| 1143 | * some userspace participation. | 1142 | * some userspace participation. |
| 1144 | */ | 1143 | */ |
| 1145 | int __init usb_composite_register(struct usb_composite_driver *driver) | 1144 | int usb_composite_register(struct usb_composite_driver *driver) |
| 1146 | { | 1145 | { |
| 1147 | if (!driver || !driver->dev || !driver->bind || composite) | 1146 | if (!driver || !driver->dev || !driver->bind || composite) |
| 1148 | return -EINVAL; | 1147 | return -EINVAL; |
| @@ -1163,7 +1162,7 @@ int __init usb_composite_register(struct usb_composite_driver *driver) | |||
| 1163 | * This function is used to unregister drivers using the composite | 1162 | * This function is used to unregister drivers using the composite |
| 1164 | * driver framework. | 1163 | * driver framework. |
| 1165 | */ | 1164 | */ |
| 1166 | void /* __exit */ usb_composite_unregister(struct usb_composite_driver *driver) | 1165 | void usb_composite_unregister(struct usb_composite_driver *driver) |
| 1167 | { | 1166 | { |
| 1168 | if (composite != driver) | 1167 | if (composite != driver) |
| 1169 | return; | 1168 | return; |
diff --git a/drivers/usb/gadget/config.c b/drivers/usb/gadget/config.c index 47e8e722682c..09084fd646ab 100644 --- a/drivers/usb/gadget/config.c +++ b/drivers/usb/gadget/config.c | |||
| @@ -128,7 +128,7 @@ int usb_gadget_config_buf( | |||
| 128 | * with identifiers (for interfaces, strings, endpoints, and more) | 128 | * with identifiers (for interfaces, strings, endpoints, and more) |
| 129 | * as needed by a given function instance. | 129 | * as needed by a given function instance. |
| 130 | */ | 130 | */ |
| 131 | struct usb_descriptor_header **__init | 131 | struct usb_descriptor_header ** |
| 132 | usb_copy_descriptors(struct usb_descriptor_header **src) | 132 | usb_copy_descriptors(struct usb_descriptor_header **src) |
| 133 | { | 133 | { |
| 134 | struct usb_descriptor_header **tmp; | 134 | struct usb_descriptor_header **tmp; |
| @@ -175,7 +175,7 @@ usb_copy_descriptors(struct usb_descriptor_header **src) | |||
| 175 | * intended use is to help remembering the endpoint descriptor to use | 175 | * intended use is to help remembering the endpoint descriptor to use |
| 176 | * when enabling a given endpoint. | 176 | * when enabling a given endpoint. |
| 177 | */ | 177 | */ |
| 178 | struct usb_endpoint_descriptor *__init | 178 | struct usb_endpoint_descriptor * |
| 179 | usb_find_endpoint( | 179 | usb_find_endpoint( |
| 180 | struct usb_descriptor_header **src, | 180 | struct usb_descriptor_header **src, |
| 181 | struct usb_descriptor_header **copy, | 181 | struct usb_descriptor_header **copy, |
diff --git a/drivers/usb/gadget/epautoconf.c b/drivers/usb/gadget/epautoconf.c index 3568de210f79..8a832488ccdd 100644 --- a/drivers/usb/gadget/epautoconf.c +++ b/drivers/usb/gadget/epautoconf.c | |||
| @@ -34,12 +34,12 @@ | |||
| 34 | 34 | ||
| 35 | 35 | ||
| 36 | /* we must assign addresses for configurable endpoints (like net2280) */ | 36 | /* we must assign addresses for configurable endpoints (like net2280) */ |
| 37 | static __initdata unsigned epnum; | 37 | static unsigned epnum; |
| 38 | 38 | ||
| 39 | // #define MANY_ENDPOINTS | 39 | // #define MANY_ENDPOINTS |
| 40 | #ifdef MANY_ENDPOINTS | 40 | #ifdef MANY_ENDPOINTS |
| 41 | /* more than 15 configurable endpoints */ | 41 | /* more than 15 configurable endpoints */ |
| 42 | static __initdata unsigned in_epnum; | 42 | static unsigned in_epnum; |
| 43 | #endif | 43 | #endif |
| 44 | 44 | ||
| 45 | 45 | ||
| @@ -59,7 +59,7 @@ static __initdata unsigned in_epnum; | |||
| 59 | * NOTE: each endpoint is unidirectional, as specified by its USB | 59 | * NOTE: each endpoint is unidirectional, as specified by its USB |
| 60 | * descriptor; and isn't specific to a configuration or altsetting. | 60 | * descriptor; and isn't specific to a configuration or altsetting. |
| 61 | */ | 61 | */ |
| 62 | static int __init | 62 | static int |
| 63 | ep_matches ( | 63 | ep_matches ( |
| 64 | struct usb_gadget *gadget, | 64 | struct usb_gadget *gadget, |
| 65 | struct usb_ep *ep, | 65 | struct usb_ep *ep, |
| @@ -187,7 +187,7 @@ ep_matches ( | |||
| 187 | return 1; | 187 | return 1; |
| 188 | } | 188 | } |
| 189 | 189 | ||
| 190 | static struct usb_ep * __init | 190 | static struct usb_ep * |
| 191 | find_ep (struct usb_gadget *gadget, const char *name) | 191 | find_ep (struct usb_gadget *gadget, const char *name) |
| 192 | { | 192 | { |
| 193 | struct usb_ep *ep; | 193 | struct usb_ep *ep; |
| @@ -229,7 +229,7 @@ find_ep (struct usb_gadget *gadget, const char *name) | |||
| 229 | * | 229 | * |
| 230 | * On failure, this returns a null endpoint descriptor. | 230 | * On failure, this returns a null endpoint descriptor. |
| 231 | */ | 231 | */ |
| 232 | struct usb_ep * __init usb_ep_autoconfig ( | 232 | struct usb_ep *usb_ep_autoconfig ( |
| 233 | struct usb_gadget *gadget, | 233 | struct usb_gadget *gadget, |
| 234 | struct usb_endpoint_descriptor *desc | 234 | struct usb_endpoint_descriptor *desc |
| 235 | ) | 235 | ) |
| @@ -304,7 +304,7 @@ struct usb_ep * __init usb_ep_autoconfig ( | |||
| 304 | * state such as ep->driver_data and the record of assigned endpoints | 304 | * state such as ep->driver_data and the record of assigned endpoints |
| 305 | * used by usb_ep_autoconfig(). | 305 | * used by usb_ep_autoconfig(). |
| 306 | */ | 306 | */ |
| 307 | void __init usb_ep_autoconfig_reset (struct usb_gadget *gadget) | 307 | void usb_ep_autoconfig_reset (struct usb_gadget *gadget) |
| 308 | { | 308 | { |
| 309 | struct usb_ep *ep; | 309 | struct usb_ep *ep; |
| 310 | 310 | ||
diff --git a/drivers/usb/gadget/f_acm.c b/drivers/usb/gadget/f_acm.c index 400e1ebe6976..d47a123f15ab 100644 --- a/drivers/usb/gadget/f_acm.c +++ b/drivers/usb/gadget/f_acm.c | |||
| @@ -116,7 +116,7 @@ acm_iad_descriptor = { | |||
| 116 | }; | 116 | }; |
| 117 | 117 | ||
| 118 | 118 | ||
| 119 | static struct usb_interface_descriptor acm_control_interface_desc __initdata = { | 119 | static struct usb_interface_descriptor acm_control_interface_desc = { |
| 120 | .bLength = USB_DT_INTERFACE_SIZE, | 120 | .bLength = USB_DT_INTERFACE_SIZE, |
| 121 | .bDescriptorType = USB_DT_INTERFACE, | 121 | .bDescriptorType = USB_DT_INTERFACE, |
| 122 | /* .bInterfaceNumber = DYNAMIC */ | 122 | /* .bInterfaceNumber = DYNAMIC */ |
| @@ -127,7 +127,7 @@ static struct usb_interface_descriptor acm_control_interface_desc __initdata = { | |||
| 127 | /* .iInterface = DYNAMIC */ | 127 | /* .iInterface = DYNAMIC */ |
| 128 | }; | 128 | }; |
| 129 | 129 | ||
| 130 | static struct usb_interface_descriptor acm_data_interface_desc __initdata = { | 130 | static struct usb_interface_descriptor acm_data_interface_desc = { |
| 131 | .bLength = USB_DT_INTERFACE_SIZE, | 131 | .bLength = USB_DT_INTERFACE_SIZE, |
| 132 | .bDescriptorType = USB_DT_INTERFACE, | 132 | .bDescriptorType = USB_DT_INTERFACE, |
| 133 | /* .bInterfaceNumber = DYNAMIC */ | 133 | /* .bInterfaceNumber = DYNAMIC */ |
| @@ -138,7 +138,7 @@ static struct usb_interface_descriptor acm_data_interface_desc __initdata = { | |||
| 138 | /* .iInterface = DYNAMIC */ | 138 | /* .iInterface = DYNAMIC */ |
| 139 | }; | 139 | }; |
| 140 | 140 | ||
| 141 | static struct usb_cdc_header_desc acm_header_desc __initdata = { | 141 | static struct usb_cdc_header_desc acm_header_desc = { |
| 142 | .bLength = sizeof(acm_header_desc), | 142 | .bLength = sizeof(acm_header_desc), |
| 143 | .bDescriptorType = USB_DT_CS_INTERFACE, | 143 | .bDescriptorType = USB_DT_CS_INTERFACE, |
| 144 | .bDescriptorSubType = USB_CDC_HEADER_TYPE, | 144 | .bDescriptorSubType = USB_CDC_HEADER_TYPE, |
| @@ -146,7 +146,7 @@ static struct usb_cdc_header_desc acm_header_desc __initdata = { | |||
| 146 | }; | 146 | }; |
| 147 | 147 | ||
| 148 | static struct usb_cdc_call_mgmt_descriptor | 148 | static struct usb_cdc_call_mgmt_descriptor |
| 149 | acm_call_mgmt_descriptor __initdata = { | 149 | acm_call_mgmt_descriptor = { |
| 150 | .bLength = sizeof(acm_call_mgmt_descriptor), | 150 | .bLength = sizeof(acm_call_mgmt_descriptor), |
| 151 | .bDescriptorType = USB_DT_CS_INTERFACE, | 151 | .bDescriptorType = USB_DT_CS_INTERFACE, |
| 152 | .bDescriptorSubType = USB_CDC_CALL_MANAGEMENT_TYPE, | 152 | .bDescriptorSubType = USB_CDC_CALL_MANAGEMENT_TYPE, |
| @@ -154,14 +154,14 @@ acm_call_mgmt_descriptor __initdata = { | |||
| 154 | /* .bDataInterface = DYNAMIC */ | 154 | /* .bDataInterface = DYNAMIC */ |
| 155 | }; | 155 | }; |
| 156 | 156 | ||
| 157 | static struct usb_cdc_acm_descriptor acm_descriptor __initdata = { | 157 | static struct usb_cdc_acm_descriptor acm_descriptor = { |
| 158 | .bLength = sizeof(acm_descriptor), | 158 | .bLength = sizeof(acm_descriptor), |
| 159 | .bDescriptorType = USB_DT_CS_INTERFACE, | 159 | .bDescriptorType = USB_DT_CS_INTERFACE, |
| 160 | .bDescriptorSubType = USB_CDC_ACM_TYPE, | 160 | .bDescriptorSubType = USB_CDC_ACM_TYPE, |
| 161 | .bmCapabilities = USB_CDC_CAP_LINE, | 161 | .bmCapabilities = USB_CDC_CAP_LINE, |
| 162 | }; | 162 | }; |
| 163 | 163 | ||
| 164 | static struct usb_cdc_union_desc acm_union_desc __initdata = { | 164 | static struct usb_cdc_union_desc acm_union_desc = { |
| 165 | .bLength = sizeof(acm_union_desc), | 165 | .bLength = sizeof(acm_union_desc), |
| 166 | .bDescriptorType = USB_DT_CS_INTERFACE, | 166 | .bDescriptorType = USB_DT_CS_INTERFACE, |
| 167 | .bDescriptorSubType = USB_CDC_UNION_TYPE, | 167 | .bDescriptorSubType = USB_CDC_UNION_TYPE, |
| @@ -171,7 +171,7 @@ static struct usb_cdc_union_desc acm_union_desc __initdata = { | |||
| 171 | 171 | ||
| 172 | /* full speed support: */ | 172 | /* full speed support: */ |
| 173 | 173 | ||
| 174 | static struct usb_endpoint_descriptor acm_fs_notify_desc __initdata = { | 174 | static struct usb_endpoint_descriptor acm_fs_notify_desc = { |
| 175 | .bLength = USB_DT_ENDPOINT_SIZE, | 175 | .bLength = USB_DT_ENDPOINT_SIZE, |
| 176 | .bDescriptorType = USB_DT_ENDPOINT, | 176 | .bDescriptorType = USB_DT_ENDPOINT, |
| 177 | .bEndpointAddress = USB_DIR_IN, | 177 | .bEndpointAddress = USB_DIR_IN, |
| @@ -180,21 +180,21 @@ static struct usb_endpoint_descriptor acm_fs_notify_desc __initdata = { | |||
| 180 | .bInterval = 1 << GS_LOG2_NOTIFY_INTERVAL, | 180 | .bInterval = 1 << GS_LOG2_NOTIFY_INTERVAL, |
| 181 | }; | 181 | }; |
| 182 | 182 | ||
| 183 | static struct usb_endpoint_descriptor acm_fs_in_desc __initdata = { | 183 | static struct usb_endpoint_descriptor acm_fs_in_desc = { |
| 184 | .bLength = USB_DT_ENDPOINT_SIZE, | 184 | .bLength = USB_DT_ENDPOINT_SIZE, |
| 185 | .bDescriptorType = USB_DT_ENDPOINT, | 185 | .bDescriptorType = USB_DT_ENDPOINT, |
| 186 | .bEndpointAddress = USB_DIR_IN, | 186 | .bEndpointAddress = USB_DIR_IN, |
| 187 | .bmAttributes = USB_ENDPOINT_XFER_BULK, | 187 | .bmAttributes = USB_ENDPOINT_XFER_BULK, |
| 188 | }; | 188 | }; |
| 189 | 189 | ||
| 190 | static struct usb_endpoint_descriptor acm_fs_out_desc __initdata = { | 190 | static struct usb_endpoint_descriptor acm_fs_out_desc = { |
| 191 | .bLength = USB_DT_ENDPOINT_SIZE, | 191 | .bLength = USB_DT_ENDPOINT_SIZE, |
| 192 | .bDescriptorType = USB_DT_ENDPOINT, | 192 | .bDescriptorType = USB_DT_ENDPOINT, |
| 193 | .bEndpointAddress = USB_DIR_OUT, | 193 | .bEndpointAddress = USB_DIR_OUT, |
| 194 | .bmAttributes = USB_ENDPOINT_XFER_BULK, | 194 | .bmAttributes = USB_ENDPOINT_XFER_BULK, |
| 195 | }; | 195 | }; |
| 196 | 196 | ||
| 197 | static struct usb_descriptor_header *acm_fs_function[] __initdata = { | 197 | static struct usb_descriptor_header *acm_fs_function[] = { |
| 198 | (struct usb_descriptor_header *) &acm_iad_descriptor, | 198 | (struct usb_descriptor_header *) &acm_iad_descriptor, |
| 199 | (struct usb_descriptor_header *) &acm_control_interface_desc, | 199 | (struct usb_descriptor_header *) &acm_control_interface_desc, |
| 200 | (struct usb_descriptor_header *) &acm_header_desc, | 200 | (struct usb_descriptor_header *) &acm_header_desc, |
| @@ -210,7 +210,7 @@ static struct usb_descriptor_header *acm_fs_function[] __initdata = { | |||
| 210 | 210 | ||
| 211 | /* high speed support: */ | 211 | /* high speed support: */ |
| 212 | 212 | ||
| 213 | static struct usb_endpoint_descriptor acm_hs_notify_desc __initdata = { | 213 | static struct usb_endpoint_descriptor acm_hs_notify_desc = { |
| 214 | .bLength = USB_DT_ENDPOINT_SIZE, | 214 | .bLength = USB_DT_ENDPOINT_SIZE, |
| 215 | .bDescriptorType = USB_DT_ENDPOINT, | 215 | .bDescriptorType = USB_DT_ENDPOINT, |
| 216 | .bEndpointAddress = USB_DIR_IN, | 216 | .bEndpointAddress = USB_DIR_IN, |
| @@ -219,21 +219,21 @@ static struct usb_endpoint_descriptor acm_hs_notify_desc __initdata = { | |||
| 219 | .bInterval = GS_LOG2_NOTIFY_INTERVAL+4, | 219 | .bInterval = GS_LOG2_NOTIFY_INTERVAL+4, |
| 220 | }; | 220 | }; |
| 221 | 221 | ||
| 222 | static struct usb_endpoint_descriptor acm_hs_in_desc __initdata = { | 222 | static struct usb_endpoint_descriptor acm_hs_in_desc = { |
| 223 | .bLength = USB_DT_ENDPOINT_SIZE, | 223 | .bLength = USB_DT_ENDPOINT_SIZE, |
| 224 | .bDescriptorType = USB_DT_ENDPOINT, | 224 | .bDescriptorType = USB_DT_ENDPOINT, |
| 225 | .bmAttributes = USB_ENDPOINT_XFER_BULK, | 225 | .bmAttributes = USB_ENDPOINT_XFER_BULK, |
| 226 | .wMaxPacketSize = cpu_to_le16(512), | 226 | .wMaxPacketSize = cpu_to_le16(512), |
| 227 | }; | 227 | }; |
| 228 | 228 | ||
| 229 | static struct usb_endpoint_descriptor acm_hs_out_desc __initdata = { | 229 | static struct usb_endpoint_descriptor acm_hs_out_desc = { |
| 230 | .bLength = USB_DT_ENDPOINT_SIZE, | 230 | .bLength = USB_DT_ENDPOINT_SIZE, |
| 231 | .bDescriptorType = USB_DT_ENDPOINT, | 231 | .bDescriptorType = USB_DT_ENDPOINT, |
| 232 | .bmAttributes = USB_ENDPOINT_XFER_BULK, | 232 | .bmAttributes = USB_ENDPOINT_XFER_BULK, |
| 233 | .wMaxPacketSize = cpu_to_le16(512), | 233 | .wMaxPacketSize = cpu_to_le16(512), |
| 234 | }; | 234 | }; |
| 235 | 235 | ||
| 236 | static struct usb_descriptor_header *acm_hs_function[] __initdata = { | 236 | static struct usb_descriptor_header *acm_hs_function[] = { |
| 237 | (struct usb_descriptor_header *) &acm_iad_descriptor, | 237 | (struct usb_descriptor_header *) &acm_iad_descriptor, |
| 238 | (struct usb_descriptor_header *) &acm_control_interface_desc, | 238 | (struct usb_descriptor_header *) &acm_control_interface_desc, |
| 239 | (struct usb_descriptor_header *) &acm_header_desc, | 239 | (struct usb_descriptor_header *) &acm_header_desc, |
| @@ -571,7 +571,7 @@ static int acm_send_break(struct gserial *port, int duration) | |||
| 571 | /*-------------------------------------------------------------------------*/ | 571 | /*-------------------------------------------------------------------------*/ |
| 572 | 572 | ||
| 573 | /* ACM function driver setup/binding */ | 573 | /* ACM function driver setup/binding */ |
| 574 | static int __init | 574 | static int |
| 575 | acm_bind(struct usb_configuration *c, struct usb_function *f) | 575 | acm_bind(struct usb_configuration *c, struct usb_function *f) |
| 576 | { | 576 | { |
| 577 | struct usb_composite_dev *cdev = c->cdev; | 577 | struct usb_composite_dev *cdev = c->cdev; |
| @@ -719,7 +719,7 @@ static inline bool can_support_cdc(struct usb_configuration *c) | |||
| 719 | * handle all the ones it binds. Caller is also responsible | 719 | * handle all the ones it binds. Caller is also responsible |
| 720 | * for calling @gserial_cleanup() before module unload. | 720 | * for calling @gserial_cleanup() before module unload. |
| 721 | */ | 721 | */ |
| 722 | int __init acm_bind_config(struct usb_configuration *c, u8 port_num) | 722 | int acm_bind_config(struct usb_configuration *c, u8 port_num) |
| 723 | { | 723 | { |
| 724 | struct f_acm *acm; | 724 | struct f_acm *acm; |
| 725 | int status; | 725 | int status; |
diff --git a/drivers/usb/gadget/f_ecm.c b/drivers/usb/gadget/f_ecm.c index 4e595324c614..544257a89ed2 100644 --- a/drivers/usb/gadget/f_ecm.c +++ b/drivers/usb/gadget/f_ecm.c | |||
| @@ -113,7 +113,7 @@ static inline unsigned ecm_bitrate(struct usb_gadget *g) | |||
| 113 | 113 | ||
| 114 | /* interface descriptor: */ | 114 | /* interface descriptor: */ |
| 115 | 115 | ||
| 116 | static struct usb_interface_descriptor ecm_control_intf __initdata = { | 116 | static struct usb_interface_descriptor ecm_control_intf = { |
| 117 | .bLength = sizeof ecm_control_intf, | 117 | .bLength = sizeof ecm_control_intf, |
| 118 | .bDescriptorType = USB_DT_INTERFACE, | 118 | .bDescriptorType = USB_DT_INTERFACE, |
| 119 | 119 | ||
| @@ -126,7 +126,7 @@ static struct usb_interface_descriptor ecm_control_intf __initdata = { | |||
| 126 | /* .iInterface = DYNAMIC */ | 126 | /* .iInterface = DYNAMIC */ |
| 127 | }; | 127 | }; |
| 128 | 128 | ||
| 129 | static struct usb_cdc_header_desc ecm_header_desc __initdata = { | 129 | static struct usb_cdc_header_desc ecm_header_desc = { |
| 130 | .bLength = sizeof ecm_header_desc, | 130 | .bLength = sizeof ecm_header_desc, |
| 131 | .bDescriptorType = USB_DT_CS_INTERFACE, | 131 | .bDescriptorType = USB_DT_CS_INTERFACE, |
| 132 | .bDescriptorSubType = USB_CDC_HEADER_TYPE, | 132 | .bDescriptorSubType = USB_CDC_HEADER_TYPE, |
| @@ -134,7 +134,7 @@ static struct usb_cdc_header_desc ecm_header_desc __initdata = { | |||
| 134 | .bcdCDC = cpu_to_le16(0x0110), | 134 | .bcdCDC = cpu_to_le16(0x0110), |
| 135 | }; | 135 | }; |
| 136 | 136 | ||
| 137 | static struct usb_cdc_union_desc ecm_union_desc __initdata = { | 137 | static struct usb_cdc_union_desc ecm_union_desc = { |
| 138 | .bLength = sizeof(ecm_union_desc), | 138 | .bLength = sizeof(ecm_union_desc), |
| 139 | .bDescriptorType = USB_DT_CS_INTERFACE, | 139 | .bDescriptorType = USB_DT_CS_INTERFACE, |
| 140 | .bDescriptorSubType = USB_CDC_UNION_TYPE, | 140 | .bDescriptorSubType = USB_CDC_UNION_TYPE, |
| @@ -142,7 +142,7 @@ static struct usb_cdc_union_desc ecm_union_desc __initdata = { | |||
| 142 | /* .bSlaveInterface0 = DYNAMIC */ | 142 | /* .bSlaveInterface0 = DYNAMIC */ |
| 143 | }; | 143 | }; |
| 144 | 144 | ||
| 145 | static struct usb_cdc_ether_desc ecm_desc __initdata = { | 145 | static struct usb_cdc_ether_desc ecm_desc = { |
| 146 | .bLength = sizeof ecm_desc, | 146 | .bLength = sizeof ecm_desc, |
| 147 | .bDescriptorType = USB_DT_CS_INTERFACE, | 147 | .bDescriptorType = USB_DT_CS_INTERFACE, |
| 148 | .bDescriptorSubType = USB_CDC_ETHERNET_TYPE, | 148 | .bDescriptorSubType = USB_CDC_ETHERNET_TYPE, |
| @@ -157,7 +157,7 @@ static struct usb_cdc_ether_desc ecm_desc __initdata = { | |||
| 157 | 157 | ||
| 158 | /* the default data interface has no endpoints ... */ | 158 | /* the default data interface has no endpoints ... */ |
| 159 | 159 | ||
| 160 | static struct usb_interface_descriptor ecm_data_nop_intf __initdata = { | 160 | static struct usb_interface_descriptor ecm_data_nop_intf = { |
| 161 | .bLength = sizeof ecm_data_nop_intf, | 161 | .bLength = sizeof ecm_data_nop_intf, |
| 162 | .bDescriptorType = USB_DT_INTERFACE, | 162 | .bDescriptorType = USB_DT_INTERFACE, |
| 163 | 163 | ||
| @@ -172,7 +172,7 @@ static struct usb_interface_descriptor ecm_data_nop_intf __initdata = { | |||
| 172 | 172 | ||
| 173 | /* ... but the "real" data interface has two bulk endpoints */ | 173 | /* ... but the "real" data interface has two bulk endpoints */ |
| 174 | 174 | ||
| 175 | static struct usb_interface_descriptor ecm_data_intf __initdata = { | 175 | static struct usb_interface_descriptor ecm_data_intf = { |
| 176 | .bLength = sizeof ecm_data_intf, | 176 | .bLength = sizeof ecm_data_intf, |
| 177 | .bDescriptorType = USB_DT_INTERFACE, | 177 | .bDescriptorType = USB_DT_INTERFACE, |
| 178 | 178 | ||
| @@ -187,7 +187,7 @@ static struct usb_interface_descriptor ecm_data_intf __initdata = { | |||
| 187 | 187 | ||
| 188 | /* full speed support: */ | 188 | /* full speed support: */ |
| 189 | 189 | ||
| 190 | static struct usb_endpoint_descriptor fs_ecm_notify_desc __initdata = { | 190 | static struct usb_endpoint_descriptor fs_ecm_notify_desc = { |
| 191 | .bLength = USB_DT_ENDPOINT_SIZE, | 191 | .bLength = USB_DT_ENDPOINT_SIZE, |
| 192 | .bDescriptorType = USB_DT_ENDPOINT, | 192 | .bDescriptorType = USB_DT_ENDPOINT, |
| 193 | 193 | ||
| @@ -197,7 +197,7 @@ static struct usb_endpoint_descriptor fs_ecm_notify_desc __initdata = { | |||
| 197 | .bInterval = 1 << LOG2_STATUS_INTERVAL_MSEC, | 197 | .bInterval = 1 << LOG2_STATUS_INTERVAL_MSEC, |
| 198 | }; | 198 | }; |
| 199 | 199 | ||
| 200 | static struct usb_endpoint_descriptor fs_ecm_in_desc __initdata = { | 200 | static struct usb_endpoint_descriptor fs_ecm_in_desc = { |
| 201 | .bLength = USB_DT_ENDPOINT_SIZE, | 201 | .bLength = USB_DT_ENDPOINT_SIZE, |
| 202 | .bDescriptorType = USB_DT_ENDPOINT, | 202 | .bDescriptorType = USB_DT_ENDPOINT, |
| 203 | 203 | ||
| @@ -205,7 +205,7 @@ static struct usb_endpoint_descriptor fs_ecm_in_desc __initdata = { | |||
| 205 | .bmAttributes = USB_ENDPOINT_XFER_BULK, | 205 | .bmAttributes = USB_ENDPOINT_XFER_BULK, |
| 206 | }; | 206 | }; |
| 207 | 207 | ||
| 208 | static struct usb_endpoint_descriptor fs_ecm_out_desc __initdata = { | 208 | static struct usb_endpoint_descriptor fs_ecm_out_desc = { |
| 209 | .bLength = USB_DT_ENDPOINT_SIZE, | 209 | .bLength = USB_DT_ENDPOINT_SIZE, |
| 210 | .bDescriptorType = USB_DT_ENDPOINT, | 210 | .bDescriptorType = USB_DT_ENDPOINT, |
| 211 | 211 | ||
| @@ -213,7 +213,7 @@ static struct usb_endpoint_descriptor fs_ecm_out_desc __initdata = { | |||
| 213 | .bmAttributes = USB_ENDPOINT_XFER_BULK, | 213 | .bmAttributes = USB_ENDPOINT_XFER_BULK, |
| 214 | }; | 214 | }; |
| 215 | 215 | ||
| 216 | static struct usb_descriptor_header *ecm_fs_function[] __initdata = { | 216 | static struct usb_descriptor_header *ecm_fs_function[] = { |
| 217 | /* CDC ECM control descriptors */ | 217 | /* CDC ECM control descriptors */ |
| 218 | (struct usb_descriptor_header *) &ecm_control_intf, | 218 | (struct usb_descriptor_header *) &ecm_control_intf, |
| 219 | (struct usb_descriptor_header *) &ecm_header_desc, | 219 | (struct usb_descriptor_header *) &ecm_header_desc, |
| @@ -231,7 +231,7 @@ static struct usb_descriptor_header *ecm_fs_function[] __initdata = { | |||
| 231 | 231 | ||
| 232 | /* high speed support: */ | 232 | /* high speed support: */ |
| 233 | 233 | ||
| 234 | static struct usb_endpoint_descriptor hs_ecm_notify_desc __initdata = { | 234 | static struct usb_endpoint_descriptor hs_ecm_notify_desc = { |
| 235 | .bLength = USB_DT_ENDPOINT_SIZE, | 235 | .bLength = USB_DT_ENDPOINT_SIZE, |
| 236 | .bDescriptorType = USB_DT_ENDPOINT, | 236 | .bDescriptorType = USB_DT_ENDPOINT, |
| 237 | 237 | ||
| @@ -240,7 +240,7 @@ static struct usb_endpoint_descriptor hs_ecm_notify_desc __initdata = { | |||
| 240 | .wMaxPacketSize = cpu_to_le16(ECM_STATUS_BYTECOUNT), | 240 | .wMaxPacketSize = cpu_to_le16(ECM_STATUS_BYTECOUNT), |
| 241 | .bInterval = LOG2_STATUS_INTERVAL_MSEC + 4, | 241 | .bInterval = LOG2_STATUS_INTERVAL_MSEC + 4, |
| 242 | }; | 242 | }; |
| 243 | static struct usb_endpoint_descriptor hs_ecm_in_desc __initdata = { | 243 | static struct usb_endpoint_descriptor hs_ecm_in_desc = { |
| 244 | .bLength = USB_DT_ENDPOINT_SIZE, | 244 | .bLength = USB_DT_ENDPOINT_SIZE, |
| 245 | .bDescriptorType = USB_DT_ENDPOINT, | 245 | .bDescriptorType = USB_DT_ENDPOINT, |
| 246 | 246 | ||
| @@ -249,7 +249,7 @@ static struct usb_endpoint_descriptor hs_ecm_in_desc __initdata = { | |||
| 249 | .wMaxPacketSize = cpu_to_le16(512), | 249 | .wMaxPacketSize = cpu_to_le16(512), |
| 250 | }; | 250 | }; |
| 251 | 251 | ||
| 252 | static struct usb_endpoint_descriptor hs_ecm_out_desc __initdata = { | 252 | static struct usb_endpoint_descriptor hs_ecm_out_desc = { |
| 253 | .bLength = USB_DT_ENDPOINT_SIZE, | 253 | .bLength = USB_DT_ENDPOINT_SIZE, |
| 254 | .bDescriptorType = USB_DT_ENDPOINT, | 254 | .bDescriptorType = USB_DT_ENDPOINT, |
| 255 | 255 | ||
| @@ -258,7 +258,7 @@ static struct usb_endpoint_descriptor hs_ecm_out_desc __initdata = { | |||
| 258 | .wMaxPacketSize = cpu_to_le16(512), | 258 | .wMaxPacketSize = cpu_to_le16(512), |
| 259 | }; | 259 | }; |
| 260 | 260 | ||
| 261 | static struct usb_descriptor_header *ecm_hs_function[] __initdata = { | 261 | static struct usb_descriptor_header *ecm_hs_function[] = { |
| 262 | /* CDC ECM control descriptors */ | 262 | /* CDC ECM control descriptors */ |
| 263 | (struct usb_descriptor_header *) &ecm_control_intf, | 263 | (struct usb_descriptor_header *) &ecm_control_intf, |
| 264 | (struct usb_descriptor_header *) &ecm_header_desc, | 264 | (struct usb_descriptor_header *) &ecm_header_desc, |
| @@ -597,7 +597,7 @@ static void ecm_close(struct gether *geth) | |||
| 597 | 597 | ||
| 598 | /* ethernet function driver setup/binding */ | 598 | /* ethernet function driver setup/binding */ |
| 599 | 599 | ||
| 600 | static int __init | 600 | static int |
| 601 | ecm_bind(struct usb_configuration *c, struct usb_function *f) | 601 | ecm_bind(struct usb_configuration *c, struct usb_function *f) |
| 602 | { | 602 | { |
| 603 | struct usb_composite_dev *cdev = c->cdev; | 603 | struct usb_composite_dev *cdev = c->cdev; |
| @@ -763,7 +763,8 @@ ecm_unbind(struct usb_configuration *c, struct usb_function *f) | |||
| 763 | * Caller must have called @gether_setup(). Caller is also responsible | 763 | * Caller must have called @gether_setup(). Caller is also responsible |
| 764 | * for calling @gether_cleanup() before module unload. | 764 | * for calling @gether_cleanup() before module unload. |
| 765 | */ | 765 | */ |
| 766 | int __init ecm_bind_config(struct usb_configuration *c, u8 ethaddr[ETH_ALEN]) | 766 | int |
| 767 | ecm_bind_config(struct usb_configuration *c, u8 ethaddr[ETH_ALEN]) | ||
| 767 | { | 768 | { |
| 768 | struct f_ecm *ecm; | 769 | struct f_ecm *ecm; |
| 769 | int status; | 770 | int status; |
diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c index c904aa39ad84..6cfd2f428d38 100644 --- a/drivers/usb/gadget/f_mass_storage.c +++ b/drivers/usb/gadget/f_mass_storage.c | |||
| @@ -2967,7 +2967,7 @@ static void fsg_unbind(struct usb_configuration *c, struct usb_function *f) | |||
| 2967 | } | 2967 | } |
| 2968 | 2968 | ||
| 2969 | 2969 | ||
| 2970 | static int __init fsg_bind(struct usb_configuration *c, struct usb_function *f) | 2970 | static int fsg_bind(struct usb_configuration *c, struct usb_function *f) |
| 2971 | { | 2971 | { |
| 2972 | struct fsg_dev *fsg = fsg_from_func(f); | 2972 | struct fsg_dev *fsg = fsg_from_func(f); |
| 2973 | struct usb_gadget *gadget = c->cdev->gadget; | 2973 | struct usb_gadget *gadget = c->cdev->gadget; |
diff --git a/drivers/usb/gadget/f_rndis.c b/drivers/usb/gadget/f_rndis.c index 56b022150f22..882484a40398 100644 --- a/drivers/usb/gadget/f_rndis.c +++ b/drivers/usb/gadget/f_rndis.c | |||
| @@ -122,7 +122,7 @@ static unsigned int bitrate(struct usb_gadget *g) | |||
| 122 | 122 | ||
| 123 | /* interface descriptor: */ | 123 | /* interface descriptor: */ |
| 124 | 124 | ||
| 125 | static struct usb_interface_descriptor rndis_control_intf __initdata = { | 125 | static struct usb_interface_descriptor rndis_control_intf = { |
| 126 | .bLength = sizeof rndis_control_intf, | 126 | .bLength = sizeof rndis_control_intf, |
| 127 | .bDescriptorType = USB_DT_INTERFACE, | 127 | .bDescriptorType = USB_DT_INTERFACE, |
| 128 | 128 | ||
| @@ -135,7 +135,7 @@ static struct usb_interface_descriptor rndis_control_intf __initdata = { | |||
| 135 | /* .iInterface = DYNAMIC */ | 135 | /* .iInterface = DYNAMIC */ |
| 136 | }; | 136 | }; |
| 137 | 137 | ||
| 138 | static struct usb_cdc_header_desc header_desc __initdata = { | 138 | static struct usb_cdc_header_desc header_desc = { |
| 139 | .bLength = sizeof header_desc, | 139 | .bLength = sizeof header_desc, |
| 140 | .bDescriptorType = USB_DT_CS_INTERFACE, | 140 | .bDescriptorType = USB_DT_CS_INTERFACE, |
| 141 | .bDescriptorSubType = USB_CDC_HEADER_TYPE, | 141 | .bDescriptorSubType = USB_CDC_HEADER_TYPE, |
| @@ -143,7 +143,7 @@ static struct usb_cdc_header_desc header_desc __initdata = { | |||
| 143 | .bcdCDC = cpu_to_le16(0x0110), | 143 | .bcdCDC = cpu_to_le16(0x0110), |
| 144 | }; | 144 | }; |
| 145 | 145 | ||
| 146 | static struct usb_cdc_call_mgmt_descriptor call_mgmt_descriptor __initdata = { | 146 | static struct usb_cdc_call_mgmt_descriptor call_mgmt_descriptor = { |
| 147 | .bLength = sizeof call_mgmt_descriptor, | 147 | .bLength = sizeof call_mgmt_descriptor, |
| 148 | .bDescriptorType = USB_DT_CS_INTERFACE, | 148 | .bDescriptorType = USB_DT_CS_INTERFACE, |
| 149 | .bDescriptorSubType = USB_CDC_CALL_MANAGEMENT_TYPE, | 149 | .bDescriptorSubType = USB_CDC_CALL_MANAGEMENT_TYPE, |
| @@ -152,7 +152,7 @@ static struct usb_cdc_call_mgmt_descriptor call_mgmt_descriptor __initdata = { | |||
| 152 | .bDataInterface = 0x01, | 152 | .bDataInterface = 0x01, |
| 153 | }; | 153 | }; |
| 154 | 154 | ||
| 155 | static struct usb_cdc_acm_descriptor rndis_acm_descriptor __initdata = { | 155 | static struct usb_cdc_acm_descriptor rndis_acm_descriptor = { |
| 156 | .bLength = sizeof rndis_acm_descriptor, | 156 | .bLength = sizeof rndis_acm_descriptor, |
| 157 | .bDescriptorType = USB_DT_CS_INTERFACE, | 157 | .bDescriptorType = USB_DT_CS_INTERFACE, |
| 158 | .bDescriptorSubType = USB_CDC_ACM_TYPE, | 158 | .bDescriptorSubType = USB_CDC_ACM_TYPE, |
| @@ -160,7 +160,7 @@ static struct usb_cdc_acm_descriptor rndis_acm_descriptor __initdata = { | |||
| 160 | .bmCapabilities = 0x00, | 160 | .bmCapabilities = 0x00, |
| 161 | }; | 161 | }; |
| 162 | 162 | ||
| 163 | static struct usb_cdc_union_desc rndis_union_desc __initdata = { | 163 | static struct usb_cdc_union_desc rndis_union_desc = { |
| 164 | .bLength = sizeof(rndis_union_desc), | 164 | .bLength = sizeof(rndis_union_desc), |
| 165 | .bDescriptorType = USB_DT_CS_INTERFACE, | 165 | .bDescriptorType = USB_DT_CS_INTERFACE, |
| 166 | .bDescriptorSubType = USB_CDC_UNION_TYPE, | 166 | .bDescriptorSubType = USB_CDC_UNION_TYPE, |
| @@ -170,7 +170,7 @@ static struct usb_cdc_union_desc rndis_union_desc __initdata = { | |||
| 170 | 170 | ||
| 171 | /* the data interface has two bulk endpoints */ | 171 | /* the data interface has two bulk endpoints */ |
| 172 | 172 | ||
| 173 | static struct usb_interface_descriptor rndis_data_intf __initdata = { | 173 | static struct usb_interface_descriptor rndis_data_intf = { |
| 174 | .bLength = sizeof rndis_data_intf, | 174 | .bLength = sizeof rndis_data_intf, |
| 175 | .bDescriptorType = USB_DT_INTERFACE, | 175 | .bDescriptorType = USB_DT_INTERFACE, |
| 176 | 176 | ||
| @@ -198,7 +198,7 @@ rndis_iad_descriptor = { | |||
| 198 | 198 | ||
| 199 | /* full speed support: */ | 199 | /* full speed support: */ |
| 200 | 200 | ||
| 201 | static struct usb_endpoint_descriptor fs_notify_desc __initdata = { | 201 | static struct usb_endpoint_descriptor fs_notify_desc = { |
| 202 | .bLength = USB_DT_ENDPOINT_SIZE, | 202 | .bLength = USB_DT_ENDPOINT_SIZE, |
| 203 | .bDescriptorType = USB_DT_ENDPOINT, | 203 | .bDescriptorType = USB_DT_ENDPOINT, |
| 204 | 204 | ||
| @@ -208,7 +208,7 @@ static struct usb_endpoint_descriptor fs_notify_desc __initdata = { | |||
| 208 | .bInterval = 1 << LOG2_STATUS_INTERVAL_MSEC, | 208 | .bInterval = 1 << LOG2_STATUS_INTERVAL_MSEC, |
| 209 | }; | 209 | }; |
| 210 | 210 | ||
| 211 | static struct usb_endpoint_descriptor fs_in_desc __initdata = { | 211 | static struct usb_endpoint_descriptor fs_in_desc = { |
| 212 | .bLength = USB_DT_ENDPOINT_SIZE, | 212 | .bLength = USB_DT_ENDPOINT_SIZE, |
| 213 | .bDescriptorType = USB_DT_ENDPOINT, | 213 | .bDescriptorType = USB_DT_ENDPOINT, |
| 214 | 214 | ||
| @@ -216,7 +216,7 @@ static struct usb_endpoint_descriptor fs_in_desc __initdata = { | |||
| 216 | .bmAttributes = USB_ENDPOINT_XFER_BULK, | 216 | .bmAttributes = USB_ENDPOINT_XFER_BULK, |
| 217 | }; | 217 | }; |
| 218 | 218 | ||
| 219 | static struct usb_endpoint_descriptor fs_out_desc __initdata = { | 219 | static struct usb_endpoint_descriptor fs_out_desc = { |
| 220 | .bLength = USB_DT_ENDPOINT_SIZE, | 220 | .bLength = USB_DT_ENDPOINT_SIZE, |
| 221 | .bDescriptorType = USB_DT_ENDPOINT, | 221 | .bDescriptorType = USB_DT_ENDPOINT, |
| 222 | 222 | ||
| @@ -224,7 +224,7 @@ static struct usb_endpoint_descriptor fs_out_desc __initdata = { | |||
| 224 | .bmAttributes = USB_ENDPOINT_XFER_BULK, | 224 | .bmAttributes = USB_ENDPOINT_XFER_BULK, |
| 225 | }; | 225 | }; |
| 226 | 226 | ||
| 227 | static struct usb_descriptor_header *eth_fs_function[] __initdata = { | 227 | static struct usb_descriptor_header *eth_fs_function[] = { |
| 228 | (struct usb_descriptor_header *) &rndis_iad_descriptor, | 228 | (struct usb_descriptor_header *) &rndis_iad_descriptor, |
| 229 | /* control interface matches ACM, not Ethernet */ | 229 | /* control interface matches ACM, not Ethernet */ |
| 230 | (struct usb_descriptor_header *) &rndis_control_intf, | 230 | (struct usb_descriptor_header *) &rndis_control_intf, |
| @@ -242,7 +242,7 @@ static struct usb_descriptor_header *eth_fs_function[] __initdata = { | |||
| 242 | 242 | ||
| 243 | /* high speed support: */ | 243 | /* high speed support: */ |
| 244 | 244 | ||
| 245 | static struct usb_endpoint_descriptor hs_notify_desc __initdata = { | 245 | static struct usb_endpoint_descriptor hs_notify_desc = { |
| 246 | .bLength = USB_DT_ENDPOINT_SIZE, | 246 | .bLength = USB_DT_ENDPOINT_SIZE, |
| 247 | .bDescriptorType = USB_DT_ENDPOINT, | 247 | .bDescriptorType = USB_DT_ENDPOINT, |
| 248 | 248 | ||
| @@ -251,7 +251,7 @@ static struct usb_endpoint_descriptor hs_notify_desc __initdata = { | |||
| 251 | .wMaxPacketSize = cpu_to_le16(STATUS_BYTECOUNT), | 251 | .wMaxPacketSize = cpu_to_le16(STATUS_BYTECOUNT), |
| 252 | .bInterval = LOG2_STATUS_INTERVAL_MSEC + 4, | 252 | .bInterval = LOG2_STATUS_INTERVAL_MSEC + 4, |
| 253 | }; | 253 | }; |
| 254 | static struct usb_endpoint_descriptor hs_in_desc __initdata = { | 254 | static struct usb_endpoint_descriptor hs_in_desc = { |
| 255 | .bLength = USB_DT_ENDPOINT_SIZE, | 255 | .bLength = USB_DT_ENDPOINT_SIZE, |
| 256 | .bDescriptorType = USB_DT_ENDPOINT, | 256 | .bDescriptorType = USB_DT_ENDPOINT, |
| 257 | 257 | ||
| @@ -260,7 +260,7 @@ static struct usb_endpoint_descriptor hs_in_desc __initdata = { | |||
| 260 | .wMaxPacketSize = cpu_to_le16(512), | 260 | .wMaxPacketSize = cpu_to_le16(512), |
| 261 | }; | 261 | }; |
| 262 | 262 | ||
| 263 | static struct usb_endpoint_descriptor hs_out_desc __initdata = { | 263 | static struct usb_endpoint_descriptor hs_out_desc = { |
| 264 | .bLength = USB_DT_ENDPOINT_SIZE, | 264 | .bLength = USB_DT_ENDPOINT_SIZE, |
| 265 | .bDescriptorType = USB_DT_ENDPOINT, | 265 | .bDescriptorType = USB_DT_ENDPOINT, |
| 266 | 266 | ||
| @@ -269,7 +269,7 @@ static struct usb_endpoint_descriptor hs_out_desc __initdata = { | |||
| 269 | .wMaxPacketSize = cpu_to_le16(512), | 269 | .wMaxPacketSize = cpu_to_le16(512), |
| 270 | }; | 270 | }; |
| 271 | 271 | ||
| 272 | static struct usb_descriptor_header *eth_hs_function[] __initdata = { | 272 | static struct usb_descriptor_header *eth_hs_function[] = { |
| 273 | (struct usb_descriptor_header *) &rndis_iad_descriptor, | 273 | (struct usb_descriptor_header *) &rndis_iad_descriptor, |
| 274 | /* control interface matches ACM, not Ethernet */ | 274 | /* control interface matches ACM, not Ethernet */ |
| 275 | (struct usb_descriptor_header *) &rndis_control_intf, | 275 | (struct usb_descriptor_header *) &rndis_control_intf, |
| @@ -594,7 +594,7 @@ static void rndis_close(struct gether *geth) | |||
| 594 | 594 | ||
| 595 | /* ethernet function driver setup/binding */ | 595 | /* ethernet function driver setup/binding */ |
| 596 | 596 | ||
| 597 | static int __init | 597 | static int |
| 598 | rndis_bind(struct usb_configuration *c, struct usb_function *f) | 598 | rndis_bind(struct usb_configuration *c, struct usb_function *f) |
| 599 | { | 599 | { |
| 600 | struct usb_composite_dev *cdev = c->cdev; | 600 | struct usb_composite_dev *cdev = c->cdev; |
| @@ -786,7 +786,8 @@ static inline bool can_support_rndis(struct usb_configuration *c) | |||
| 786 | * Caller must have called @gether_setup(). Caller is also responsible | 786 | * Caller must have called @gether_setup(). Caller is also responsible |
| 787 | * for calling @gether_cleanup() before module unload. | 787 | * for calling @gether_cleanup() before module unload. |
| 788 | */ | 788 | */ |
| 789 | int __init rndis_bind_config(struct usb_configuration *c, u8 ethaddr[ETH_ALEN]) | 789 | int |
| 790 | rndis_bind_config(struct usb_configuration *c, u8 ethaddr[ETH_ALEN]) | ||
| 790 | { | 791 | { |
| 791 | struct f_rndis *rndis; | 792 | struct f_rndis *rndis; |
| 792 | int status; | 793 | int status; |
diff --git a/drivers/usb/gadget/u_ether.c b/drivers/usb/gadget/u_ether.c index 07f4178ad178..1da755a1c855 100644 --- a/drivers/usb/gadget/u_ether.c +++ b/drivers/usb/gadget/u_ether.c | |||
| @@ -715,7 +715,7 @@ static u8 __init nibble(unsigned char c) | |||
| 715 | return 0; | 715 | return 0; |
| 716 | } | 716 | } |
| 717 | 717 | ||
| 718 | static int __init get_ether_addr(const char *str, u8 *dev_addr) | 718 | static int get_ether_addr(const char *str, u8 *dev_addr) |
| 719 | { | 719 | { |
| 720 | if (str) { | 720 | if (str) { |
| 721 | unsigned i; | 721 | unsigned i; |
| @@ -764,7 +764,7 @@ static struct device_type gadget_type = { | |||
| 764 | * | 764 | * |
| 765 | * Returns negative errno, or zero on success | 765 | * Returns negative errno, or zero on success |
| 766 | */ | 766 | */ |
| 767 | int __init gether_setup(struct usb_gadget *g, u8 ethaddr[ETH_ALEN]) | 767 | int gether_setup(struct usb_gadget *g, u8 ethaddr[ETH_ALEN]) |
| 768 | { | 768 | { |
| 769 | struct eth_dev *dev; | 769 | struct eth_dev *dev; |
| 770 | struct net_device *net; | 770 | struct net_device *net; |
