diff options
author | Peter Chen <peter.chen@freescale.com> | 2014-07-04 00:39:04 -0400 |
---|---|---|
committer | Peter Chen <peter.chen@freescale.com> | 2014-07-04 05:31:06 -0400 |
commit | 463ada98906cee6035426bba377b7f9d0d2f979c (patch) | |
tree | c0d194629939fd760ecff1edd5e883645e1073ea | |
parent | 295dcfe35d2708721917d136493b7a0cc84adb76 (diff) |
ENGR00320792-1 Revert "usb: gadget: remove __init from gadget driver bind function"
This reverts commit 6d9f0704e3acf4b754188817974247c1963c1493.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
-rw-r--r-- | drivers/usb/gadget/acm_ms.c | 4 | ||||
-rw-r--r-- | drivers/usb/gadget/audio.c | 4 | ||||
-rw-r--r-- | drivers/usb/gadget/cdc2.c | 4 | ||||
-rw-r--r-- | drivers/usb/gadget/dbgp.c | 4 | ||||
-rw-r--r-- | drivers/usb/gadget/ether.c | 6 | ||||
-rw-r--r-- | drivers/usb/gadget/f_eem.c | 26 | ||||
-rw-r--r-- | drivers/usb/gadget/f_hid.c | 6 | ||||
-rw-r--r-- | drivers/usb/gadget/f_midi.c | 12 | ||||
-rw-r--r-- | drivers/usb/gadget/f_ncm.c | 36 | ||||
-rw-r--r-- | drivers/usb/gadget/f_uac1.c | 12 | ||||
-rw-r--r-- | drivers/usb/gadget/f_uac2.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/f_uvc.c | 28 | ||||
-rw-r--r-- | drivers/usb/gadget/gmidi.c | 4 | ||||
-rw-r--r-- | drivers/usb/gadget/hid.c | 6 | ||||
-rw-r--r-- | drivers/usb/gadget/mass_storage.c | 4 | ||||
-rw-r--r-- | drivers/usb/gadget/multi.c | 4 | ||||
-rw-r--r-- | drivers/usb/gadget/ncm.c | 4 | ||||
-rw-r--r-- | drivers/usb/gadget/nokia.c | 4 | ||||
-rw-r--r-- | drivers/usb/gadget/printer.c | 6 | ||||
-rw-r--r-- | drivers/usb/gadget/serial.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/u_uac1.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/webcam.c | 4 | ||||
-rw-r--r-- | drivers/usb/gadget/zero.c | 2 |
23 files changed, 93 insertions, 93 deletions
diff --git a/drivers/usb/gadget/acm_ms.c b/drivers/usb/gadget/acm_ms.c index 9907a255e693..4b947bb50f62 100644 --- a/drivers/usb/gadget/acm_ms.c +++ b/drivers/usb/gadget/acm_ms.c | |||
@@ -114,7 +114,7 @@ static struct usb_function_instance *f_acm_inst; | |||
114 | /* | 114 | /* |
115 | * We _always_ have both ACM and mass storage functions. | 115 | * We _always_ have both ACM and mass storage functions. |
116 | */ | 116 | */ |
117 | static int acm_ms_do_config(struct usb_configuration *c) | 117 | static int __init acm_ms_do_config(struct usb_configuration *c) |
118 | { | 118 | { |
119 | int status; | 119 | int status; |
120 | 120 | ||
@@ -160,7 +160,7 @@ static struct usb_configuration acm_ms_config_driver = { | |||
160 | 160 | ||
161 | /*-------------------------------------------------------------------------*/ | 161 | /*-------------------------------------------------------------------------*/ |
162 | 162 | ||
163 | static int acm_ms_bind(struct usb_composite_dev *cdev) | 163 | static int __init acm_ms_bind(struct usb_composite_dev *cdev) |
164 | { | 164 | { |
165 | struct usb_gadget *gadget = cdev->gadget; | 165 | struct usb_gadget *gadget = cdev->gadget; |
166 | int status; | 166 | int status; |
diff --git a/drivers/usb/gadget/audio.c b/drivers/usb/gadget/audio.c index f2a47e9aef79..231b0efe8fdc 100644 --- a/drivers/usb/gadget/audio.c +++ b/drivers/usb/gadget/audio.c | |||
@@ -107,7 +107,7 @@ static const struct usb_descriptor_header *otg_desc[] = { | |||
107 | 107 | ||
108 | /*-------------------------------------------------------------------------*/ | 108 | /*-------------------------------------------------------------------------*/ |
109 | 109 | ||
110 | static int audio_do_config(struct usb_configuration *c) | 110 | static int __init audio_do_config(struct usb_configuration *c) |
111 | { | 111 | { |
112 | /* FIXME alloc iConfiguration string, set it in c->strings */ | 112 | /* FIXME alloc iConfiguration string, set it in c->strings */ |
113 | 113 | ||
@@ -133,7 +133,7 @@ static struct usb_configuration audio_config_driver = { | |||
133 | 133 | ||
134 | /*-------------------------------------------------------------------------*/ | 134 | /*-------------------------------------------------------------------------*/ |
135 | 135 | ||
136 | static int audio_bind(struct usb_composite_dev *cdev) | 136 | static int __init audio_bind(struct usb_composite_dev *cdev) |
137 | { | 137 | { |
138 | int status; | 138 | int status; |
139 | 139 | ||
diff --git a/drivers/usb/gadget/cdc2.c b/drivers/usb/gadget/cdc2.c index 21bd230fef1e..2c5255182769 100644 --- a/drivers/usb/gadget/cdc2.c +++ b/drivers/usb/gadget/cdc2.c | |||
@@ -111,7 +111,7 @@ static struct usb_function_instance *fi_serial; | |||
111 | /* | 111 | /* |
112 | * We _always_ have both CDC ECM and CDC ACM functions. | 112 | * We _always_ have both CDC ECM and CDC ACM functions. |
113 | */ | 113 | */ |
114 | static int cdc_do_config(struct usb_configuration *c) | 114 | static int __init cdc_do_config(struct usb_configuration *c) |
115 | { | 115 | { |
116 | int status; | 116 | int status; |
117 | 117 | ||
@@ -154,7 +154,7 @@ static struct usb_configuration cdc_config_driver = { | |||
154 | 154 | ||
155 | /*-------------------------------------------------------------------------*/ | 155 | /*-------------------------------------------------------------------------*/ |
156 | 156 | ||
157 | static int cdc_bind(struct usb_composite_dev *cdev) | 157 | static int __init cdc_bind(struct usb_composite_dev *cdev) |
158 | { | 158 | { |
159 | struct usb_gadget *gadget = cdev->gadget; | 159 | struct usb_gadget *gadget = cdev->gadget; |
160 | int status; | 160 | int status; |
diff --git a/drivers/usb/gadget/dbgp.c b/drivers/usb/gadget/dbgp.c index b96e86e17de0..986fc511a2ed 100644 --- a/drivers/usb/gadget/dbgp.c +++ b/drivers/usb/gadget/dbgp.c | |||
@@ -235,7 +235,7 @@ static void dbgp_unbind(struct usb_gadget *gadget) | |||
235 | static unsigned char tty_line; | 235 | static unsigned char tty_line; |
236 | #endif | 236 | #endif |
237 | 237 | ||
238 | static int dbgp_configure_endpoints(struct usb_gadget *gadget) | 238 | static int __init dbgp_configure_endpoints(struct usb_gadget *gadget) |
239 | { | 239 | { |
240 | int stp; | 240 | int stp; |
241 | 241 | ||
@@ -291,7 +291,7 @@ fail_1: | |||
291 | return -ENODEV; | 291 | return -ENODEV; |
292 | } | 292 | } |
293 | 293 | ||
294 | static int dbgp_bind(struct usb_gadget *gadget, | 294 | static int __init dbgp_bind(struct usb_gadget *gadget, |
295 | struct usb_gadget_driver *driver) | 295 | struct usb_gadget_driver *driver) |
296 | { | 296 | { |
297 | int err, stp; | 297 | int err, stp; |
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index ea9dfe4af7d1..56c8ecae9bc3 100644 --- a/drivers/usb/gadget/ether.c +++ b/drivers/usb/gadget/ether.c | |||
@@ -215,7 +215,7 @@ static struct eth_dev *the_dev; | |||
215 | * the first one present. That's to make Microsoft's drivers happy, | 215 | * the first one present. That's to make Microsoft's drivers happy, |
216 | * and to follow DOCSIS 1.0 (cable modem standard). | 216 | * and to follow DOCSIS 1.0 (cable modem standard). |
217 | */ | 217 | */ |
218 | static int rndis_do_config(struct usb_configuration *c) | 218 | static int __init rndis_do_config(struct usb_configuration *c) |
219 | { | 219 | { |
220 | /* FIXME alloc iConfiguration string, set it in c->strings */ | 220 | /* FIXME alloc iConfiguration string, set it in c->strings */ |
221 | 221 | ||
@@ -247,7 +247,7 @@ MODULE_PARM_DESC(use_eem, "use CDC EEM mode"); | |||
247 | /* | 247 | /* |
248 | * We _always_ have an ECM, CDC Subset, or EEM configuration. | 248 | * We _always_ have an ECM, CDC Subset, or EEM configuration. |
249 | */ | 249 | */ |
250 | static int eth_do_config(struct usb_configuration *c) | 250 | static int __init eth_do_config(struct usb_configuration *c) |
251 | { | 251 | { |
252 | /* FIXME alloc iConfiguration string, set it in c->strings */ | 252 | /* FIXME alloc iConfiguration string, set it in c->strings */ |
253 | 253 | ||
@@ -273,7 +273,7 @@ static struct usb_configuration eth_config_driver = { | |||
273 | 273 | ||
274 | /*-------------------------------------------------------------------------*/ | 274 | /*-------------------------------------------------------------------------*/ |
275 | 275 | ||
276 | static int eth_bind(struct usb_composite_dev *cdev) | 276 | static int __init eth_bind(struct usb_composite_dev *cdev) |
277 | { | 277 | { |
278 | struct usb_gadget *gadget = cdev->gadget; | 278 | struct usb_gadget *gadget = cdev->gadget; |
279 | int status; | 279 | int status; |
diff --git a/drivers/usb/gadget/f_eem.c b/drivers/usb/gadget/f_eem.c index 82281cb69308..f4e0bbef602a 100644 --- a/drivers/usb/gadget/f_eem.c +++ b/drivers/usb/gadget/f_eem.c | |||
@@ -40,7 +40,7 @@ static inline struct f_eem *func_to_eem(struct usb_function *f) | |||
40 | 40 | ||
41 | /* interface descriptor: */ | 41 | /* interface descriptor: */ |
42 | 42 | ||
43 | static struct usb_interface_descriptor eem_intf = { | 43 | static struct usb_interface_descriptor eem_intf __initdata = { |
44 | .bLength = sizeof eem_intf, | 44 | .bLength = sizeof eem_intf, |
45 | .bDescriptorType = USB_DT_INTERFACE, | 45 | .bDescriptorType = USB_DT_INTERFACE, |
46 | 46 | ||
@@ -54,7 +54,7 @@ static struct usb_interface_descriptor eem_intf = { | |||
54 | 54 | ||
55 | /* full speed support: */ | 55 | /* full speed support: */ |
56 | 56 | ||
57 | static struct usb_endpoint_descriptor eem_fs_in_desc = { | 57 | static struct usb_endpoint_descriptor eem_fs_in_desc __initdata = { |
58 | .bLength = USB_DT_ENDPOINT_SIZE, | 58 | .bLength = USB_DT_ENDPOINT_SIZE, |
59 | .bDescriptorType = USB_DT_ENDPOINT, | 59 | .bDescriptorType = USB_DT_ENDPOINT, |
60 | 60 | ||
@@ -62,7 +62,7 @@ static struct usb_endpoint_descriptor eem_fs_in_desc = { | |||
62 | .bmAttributes = USB_ENDPOINT_XFER_BULK, | 62 | .bmAttributes = USB_ENDPOINT_XFER_BULK, |
63 | }; | 63 | }; |
64 | 64 | ||
65 | static struct usb_endpoint_descriptor eem_fs_out_desc = { | 65 | static struct usb_endpoint_descriptor eem_fs_out_desc __initdata = { |
66 | .bLength = USB_DT_ENDPOINT_SIZE, | 66 | .bLength = USB_DT_ENDPOINT_SIZE, |
67 | .bDescriptorType = USB_DT_ENDPOINT, | 67 | .bDescriptorType = USB_DT_ENDPOINT, |
68 | 68 | ||
@@ -70,7 +70,7 @@ static struct usb_endpoint_descriptor eem_fs_out_desc = { | |||
70 | .bmAttributes = USB_ENDPOINT_XFER_BULK, | 70 | .bmAttributes = USB_ENDPOINT_XFER_BULK, |
71 | }; | 71 | }; |
72 | 72 | ||
73 | static struct usb_descriptor_header *eem_fs_function[] = { | 73 | static struct usb_descriptor_header *eem_fs_function[] __initdata = { |
74 | /* CDC EEM control descriptors */ | 74 | /* CDC EEM control descriptors */ |
75 | (struct usb_descriptor_header *) &eem_intf, | 75 | (struct usb_descriptor_header *) &eem_intf, |
76 | (struct usb_descriptor_header *) &eem_fs_in_desc, | 76 | (struct usb_descriptor_header *) &eem_fs_in_desc, |
@@ -80,7 +80,7 @@ static struct usb_descriptor_header *eem_fs_function[] = { | |||
80 | 80 | ||
81 | /* high speed support: */ | 81 | /* high speed support: */ |
82 | 82 | ||
83 | static struct usb_endpoint_descriptor eem_hs_in_desc = { | 83 | static struct usb_endpoint_descriptor eem_hs_in_desc __initdata = { |
84 | .bLength = USB_DT_ENDPOINT_SIZE, | 84 | .bLength = USB_DT_ENDPOINT_SIZE, |
85 | .bDescriptorType = USB_DT_ENDPOINT, | 85 | .bDescriptorType = USB_DT_ENDPOINT, |
86 | 86 | ||
@@ -89,7 +89,7 @@ static struct usb_endpoint_descriptor eem_hs_in_desc = { | |||
89 | .wMaxPacketSize = cpu_to_le16(512), | 89 | .wMaxPacketSize = cpu_to_le16(512), |
90 | }; | 90 | }; |
91 | 91 | ||
92 | static struct usb_endpoint_descriptor eem_hs_out_desc = { | 92 | static struct usb_endpoint_descriptor eem_hs_out_desc __initdata = { |
93 | .bLength = USB_DT_ENDPOINT_SIZE, | 93 | .bLength = USB_DT_ENDPOINT_SIZE, |
94 | .bDescriptorType = USB_DT_ENDPOINT, | 94 | .bDescriptorType = USB_DT_ENDPOINT, |
95 | 95 | ||
@@ -98,7 +98,7 @@ static struct usb_endpoint_descriptor eem_hs_out_desc = { | |||
98 | .wMaxPacketSize = cpu_to_le16(512), | 98 | .wMaxPacketSize = cpu_to_le16(512), |
99 | }; | 99 | }; |
100 | 100 | ||
101 | static struct usb_descriptor_header *eem_hs_function[] = { | 101 | static struct usb_descriptor_header *eem_hs_function[] __initdata = { |
102 | /* CDC EEM control descriptors */ | 102 | /* CDC EEM control descriptors */ |
103 | (struct usb_descriptor_header *) &eem_intf, | 103 | (struct usb_descriptor_header *) &eem_intf, |
104 | (struct usb_descriptor_header *) &eem_hs_in_desc, | 104 | (struct usb_descriptor_header *) &eem_hs_in_desc, |
@@ -108,7 +108,7 @@ static struct usb_descriptor_header *eem_hs_function[] = { | |||
108 | 108 | ||
109 | /* super speed support: */ | 109 | /* super speed support: */ |
110 | 110 | ||
111 | static struct usb_endpoint_descriptor eem_ss_in_desc = { | 111 | static struct usb_endpoint_descriptor eem_ss_in_desc __initdata = { |
112 | .bLength = USB_DT_ENDPOINT_SIZE, | 112 | .bLength = USB_DT_ENDPOINT_SIZE, |
113 | .bDescriptorType = USB_DT_ENDPOINT, | 113 | .bDescriptorType = USB_DT_ENDPOINT, |
114 | 114 | ||
@@ -117,7 +117,7 @@ static struct usb_endpoint_descriptor eem_ss_in_desc = { | |||
117 | .wMaxPacketSize = cpu_to_le16(1024), | 117 | .wMaxPacketSize = cpu_to_le16(1024), |
118 | }; | 118 | }; |
119 | 119 | ||
120 | static struct usb_endpoint_descriptor eem_ss_out_desc = { | 120 | static struct usb_endpoint_descriptor eem_ss_out_desc __initdata = { |
121 | .bLength = USB_DT_ENDPOINT_SIZE, | 121 | .bLength = USB_DT_ENDPOINT_SIZE, |
122 | .bDescriptorType = USB_DT_ENDPOINT, | 122 | .bDescriptorType = USB_DT_ENDPOINT, |
123 | 123 | ||
@@ -126,7 +126,7 @@ static struct usb_endpoint_descriptor eem_ss_out_desc = { | |||
126 | .wMaxPacketSize = cpu_to_le16(1024), | 126 | .wMaxPacketSize = cpu_to_le16(1024), |
127 | }; | 127 | }; |
128 | 128 | ||
129 | static struct usb_ss_ep_comp_descriptor eem_ss_bulk_comp_desc = { | 129 | static struct usb_ss_ep_comp_descriptor eem_ss_bulk_comp_desc __initdata = { |
130 | .bLength = sizeof eem_ss_bulk_comp_desc, | 130 | .bLength = sizeof eem_ss_bulk_comp_desc, |
131 | .bDescriptorType = USB_DT_SS_ENDPOINT_COMP, | 131 | .bDescriptorType = USB_DT_SS_ENDPOINT_COMP, |
132 | 132 | ||
@@ -135,7 +135,7 @@ static struct usb_ss_ep_comp_descriptor eem_ss_bulk_comp_desc = { | |||
135 | /* .bmAttributes = 0, */ | 135 | /* .bmAttributes = 0, */ |
136 | }; | 136 | }; |
137 | 137 | ||
138 | static struct usb_descriptor_header *eem_ss_function[] = { | 138 | static struct usb_descriptor_header *eem_ss_function[] __initdata = { |
139 | /* CDC EEM control descriptors */ | 139 | /* CDC EEM control descriptors */ |
140 | (struct usb_descriptor_header *) &eem_intf, | 140 | (struct usb_descriptor_header *) &eem_intf, |
141 | (struct usb_descriptor_header *) &eem_ss_in_desc, | 141 | (struct usb_descriptor_header *) &eem_ss_in_desc, |
@@ -242,7 +242,7 @@ static void eem_disable(struct usb_function *f) | |||
242 | 242 | ||
243 | /* EEM function driver setup/binding */ | 243 | /* EEM function driver setup/binding */ |
244 | 244 | ||
245 | static int | 245 | static int __init |
246 | eem_bind(struct usb_configuration *c, struct usb_function *f) | 246 | eem_bind(struct usb_configuration *c, struct usb_function *f) |
247 | { | 247 | { |
248 | struct usb_composite_dev *cdev = c->cdev; | 248 | struct usb_composite_dev *cdev = c->cdev; |
@@ -528,7 +528,7 @@ error: | |||
528 | * Caller must have called @gether_setup(). Caller is also responsible | 528 | * Caller must have called @gether_setup(). Caller is also responsible |
529 | * for calling @gether_cleanup() before module unload. | 529 | * for calling @gether_cleanup() before module unload. |
530 | */ | 530 | */ |
531 | int eem_bind_config(struct usb_configuration *c, struct eth_dev *dev) | 531 | int __init eem_bind_config(struct usb_configuration *c, struct eth_dev *dev) |
532 | { | 532 | { |
533 | struct f_eem *eem; | 533 | struct f_eem *eem; |
534 | int status; | 534 | int status; |
diff --git a/drivers/usb/gadget/f_hid.c b/drivers/usb/gadget/f_hid.c index 991320e14f0b..6e69a8e8d22a 100644 --- a/drivers/usb/gadget/f_hid.c +++ b/drivers/usb/gadget/f_hid.c | |||
@@ -560,7 +560,7 @@ const struct file_operations f_hidg_fops = { | |||
560 | .llseek = noop_llseek, | 560 | .llseek = noop_llseek, |
561 | }; | 561 | }; |
562 | 562 | ||
563 | static int hidg_bind(struct usb_configuration *c, struct usb_function *f) | 563 | static int __init hidg_bind(struct usb_configuration *c, struct usb_function *f) |
564 | { | 564 | { |
565 | struct usb_ep *ep; | 565 | struct usb_ep *ep; |
566 | struct f_hidg *hidg = func_to_hidg(f); | 566 | struct f_hidg *hidg = func_to_hidg(f); |
@@ -689,7 +689,7 @@ static struct usb_gadget_strings *ct_func_strings[] = { | |||
689 | /*-------------------------------------------------------------------------*/ | 689 | /*-------------------------------------------------------------------------*/ |
690 | /* usb_configuration */ | 690 | /* usb_configuration */ |
691 | 691 | ||
692 | int hidg_bind_config(struct usb_configuration *c, | 692 | int __init hidg_bind_config(struct usb_configuration *c, |
693 | struct hidg_func_descriptor *fdesc, int index) | 693 | struct hidg_func_descriptor *fdesc, int index) |
694 | { | 694 | { |
695 | struct f_hidg *hidg; | 695 | struct f_hidg *hidg; |
@@ -743,7 +743,7 @@ int hidg_bind_config(struct usb_configuration *c, | |||
743 | return status; | 743 | return status; |
744 | } | 744 | } |
745 | 745 | ||
746 | int ghid_setup(struct usb_gadget *g, int count) | 746 | int __init ghid_setup(struct usb_gadget *g, int count) |
747 | { | 747 | { |
748 | int status; | 748 | int status; |
749 | dev_t dev; | 749 | dev_t dev; |
diff --git a/drivers/usb/gadget/f_midi.c b/drivers/usb/gadget/f_midi.c index c28e0a74c102..263e721c2694 100644 --- a/drivers/usb/gadget/f_midi.c +++ b/drivers/usb/gadget/f_midi.c | |||
@@ -97,7 +97,7 @@ DECLARE_USB_MIDI_OUT_JACK_DESCRIPTOR(1); | |||
97 | DECLARE_USB_MS_ENDPOINT_DESCRIPTOR(16); | 97 | DECLARE_USB_MS_ENDPOINT_DESCRIPTOR(16); |
98 | 98 | ||
99 | /* B.3.1 Standard AC Interface Descriptor */ | 99 | /* B.3.1 Standard AC Interface Descriptor */ |
100 | static struct usb_interface_descriptor ac_interface_desc = { | 100 | static struct usb_interface_descriptor ac_interface_desc __initdata = { |
101 | .bLength = USB_DT_INTERFACE_SIZE, | 101 | .bLength = USB_DT_INTERFACE_SIZE, |
102 | .bDescriptorType = USB_DT_INTERFACE, | 102 | .bDescriptorType = USB_DT_INTERFACE, |
103 | /* .bInterfaceNumber = DYNAMIC */ | 103 | /* .bInterfaceNumber = DYNAMIC */ |
@@ -108,7 +108,7 @@ static struct usb_interface_descriptor ac_interface_desc = { | |||
108 | }; | 108 | }; |
109 | 109 | ||
110 | /* B.3.2 Class-Specific AC Interface Descriptor */ | 110 | /* B.3.2 Class-Specific AC Interface Descriptor */ |
111 | static struct uac1_ac_header_descriptor_1 ac_header_desc = { | 111 | static struct uac1_ac_header_descriptor_1 ac_header_desc __initdata = { |
112 | .bLength = UAC_DT_AC_HEADER_SIZE(1), | 112 | .bLength = UAC_DT_AC_HEADER_SIZE(1), |
113 | .bDescriptorType = USB_DT_CS_INTERFACE, | 113 | .bDescriptorType = USB_DT_CS_INTERFACE, |
114 | .bDescriptorSubtype = USB_MS_HEADER, | 114 | .bDescriptorSubtype = USB_MS_HEADER, |
@@ -119,7 +119,7 @@ static struct uac1_ac_header_descriptor_1 ac_header_desc = { | |||
119 | }; | 119 | }; |
120 | 120 | ||
121 | /* B.4.1 Standard MS Interface Descriptor */ | 121 | /* B.4.1 Standard MS Interface Descriptor */ |
122 | static struct usb_interface_descriptor ms_interface_desc = { | 122 | static struct usb_interface_descriptor ms_interface_desc __initdata = { |
123 | .bLength = USB_DT_INTERFACE_SIZE, | 123 | .bLength = USB_DT_INTERFACE_SIZE, |
124 | .bDescriptorType = USB_DT_INTERFACE, | 124 | .bDescriptorType = USB_DT_INTERFACE, |
125 | /* .bInterfaceNumber = DYNAMIC */ | 125 | /* .bInterfaceNumber = DYNAMIC */ |
@@ -130,7 +130,7 @@ static struct usb_interface_descriptor ms_interface_desc = { | |||
130 | }; | 130 | }; |
131 | 131 | ||
132 | /* B.4.2 Class-Specific MS Interface Descriptor */ | 132 | /* B.4.2 Class-Specific MS Interface Descriptor */ |
133 | static struct usb_ms_header_descriptor ms_header_desc = { | 133 | static struct usb_ms_header_descriptor ms_header_desc __initdata = { |
134 | .bLength = USB_DT_MS_HEADER_SIZE, | 134 | .bLength = USB_DT_MS_HEADER_SIZE, |
135 | .bDescriptorType = USB_DT_CS_INTERFACE, | 135 | .bDescriptorType = USB_DT_CS_INTERFACE, |
136 | .bDescriptorSubtype = USB_MS_HEADER, | 136 | .bDescriptorSubtype = USB_MS_HEADER, |
@@ -733,7 +733,7 @@ fail: | |||
733 | 733 | ||
734 | /* MIDI function driver setup/binding */ | 734 | /* MIDI function driver setup/binding */ |
735 | 735 | ||
736 | static int | 736 | static int __init |
737 | f_midi_bind(struct usb_configuration *c, struct usb_function *f) | 737 | f_midi_bind(struct usb_configuration *c, struct usb_function *f) |
738 | { | 738 | { |
739 | struct usb_descriptor_header **midi_function; | 739 | struct usb_descriptor_header **midi_function; |
@@ -923,7 +923,7 @@ fail: | |||
923 | * | 923 | * |
924 | * Returns zero on success, else negative errno. | 924 | * Returns zero on success, else negative errno. |
925 | */ | 925 | */ |
926 | int f_midi_bind_config(struct usb_configuration *c, | 926 | int __init f_midi_bind_config(struct usb_configuration *c, |
927 | int index, char *id, | 927 | int index, char *id, |
928 | unsigned int in_ports, | 928 | unsigned int in_ports, |
929 | unsigned int out_ports, | 929 | unsigned int out_ports, |
diff --git a/drivers/usb/gadget/f_ncm.c b/drivers/usb/gadget/f_ncm.c index d65e49ceca44..ee19bc8d0040 100644 --- a/drivers/usb/gadget/f_ncm.c +++ b/drivers/usb/gadget/f_ncm.c | |||
@@ -125,7 +125,7 @@ static struct usb_cdc_ncm_ntb_parameters ntb_parameters = { | |||
125 | #define NCM_STATUS_INTERVAL_MS 32 | 125 | #define NCM_STATUS_INTERVAL_MS 32 |
126 | #define NCM_STATUS_BYTECOUNT 16 /* 8 byte header + data */ | 126 | #define NCM_STATUS_BYTECOUNT 16 /* 8 byte header + data */ |
127 | 127 | ||
128 | static struct usb_interface_assoc_descriptor ncm_iad_desc = { | 128 | static struct usb_interface_assoc_descriptor ncm_iad_desc __initdata = { |
129 | .bLength = sizeof ncm_iad_desc, | 129 | .bLength = sizeof ncm_iad_desc, |
130 | .bDescriptorType = USB_DT_INTERFACE_ASSOCIATION, | 130 | .bDescriptorType = USB_DT_INTERFACE_ASSOCIATION, |
131 | 131 | ||
@@ -139,7 +139,7 @@ static struct usb_interface_assoc_descriptor ncm_iad_desc = { | |||
139 | 139 | ||
140 | /* interface descriptor: */ | 140 | /* interface descriptor: */ |
141 | 141 | ||
142 | static struct usb_interface_descriptor ncm_control_intf = { | 142 | static struct usb_interface_descriptor ncm_control_intf __initdata = { |
143 | .bLength = sizeof ncm_control_intf, | 143 | .bLength = sizeof ncm_control_intf, |
144 | .bDescriptorType = USB_DT_INTERFACE, | 144 | .bDescriptorType = USB_DT_INTERFACE, |
145 | 145 | ||
@@ -151,7 +151,7 @@ static struct usb_interface_descriptor ncm_control_intf = { | |||
151 | /* .iInterface = DYNAMIC */ | 151 | /* .iInterface = DYNAMIC */ |
152 | }; | 152 | }; |
153 | 153 | ||
154 | static struct usb_cdc_header_desc ncm_header_desc = { | 154 | static struct usb_cdc_header_desc ncm_header_desc __initdata = { |
155 | .bLength = sizeof ncm_header_desc, | 155 | .bLength = sizeof ncm_header_desc, |
156 | .bDescriptorType = USB_DT_CS_INTERFACE, | 156 | .bDescriptorType = USB_DT_CS_INTERFACE, |
157 | .bDescriptorSubType = USB_CDC_HEADER_TYPE, | 157 | .bDescriptorSubType = USB_CDC_HEADER_TYPE, |
@@ -159,7 +159,7 @@ static struct usb_cdc_header_desc ncm_header_desc = { | |||
159 | .bcdCDC = cpu_to_le16(0x0110), | 159 | .bcdCDC = cpu_to_le16(0x0110), |
160 | }; | 160 | }; |
161 | 161 | ||
162 | static struct usb_cdc_union_desc ncm_union_desc = { | 162 | static struct usb_cdc_union_desc ncm_union_desc __initdata = { |
163 | .bLength = sizeof(ncm_union_desc), | 163 | .bLength = sizeof(ncm_union_desc), |
164 | .bDescriptorType = USB_DT_CS_INTERFACE, | 164 | .bDescriptorType = USB_DT_CS_INTERFACE, |
165 | .bDescriptorSubType = USB_CDC_UNION_TYPE, | 165 | .bDescriptorSubType = USB_CDC_UNION_TYPE, |
@@ -167,7 +167,7 @@ static struct usb_cdc_union_desc ncm_union_desc = { | |||
167 | /* .bSlaveInterface0 = DYNAMIC */ | 167 | /* .bSlaveInterface0 = DYNAMIC */ |
168 | }; | 168 | }; |
169 | 169 | ||
170 | static struct usb_cdc_ether_desc ecm_desc = { | 170 | static struct usb_cdc_ether_desc ecm_desc __initdata = { |
171 | .bLength = sizeof ecm_desc, | 171 | .bLength = sizeof ecm_desc, |
172 | .bDescriptorType = USB_DT_CS_INTERFACE, | 172 | .bDescriptorType = USB_DT_CS_INTERFACE, |
173 | .bDescriptorSubType = USB_CDC_ETHERNET_TYPE, | 173 | .bDescriptorSubType = USB_CDC_ETHERNET_TYPE, |
@@ -182,7 +182,7 @@ static struct usb_cdc_ether_desc ecm_desc = { | |||
182 | 182 | ||
183 | #define NCAPS (USB_CDC_NCM_NCAP_ETH_FILTER | USB_CDC_NCM_NCAP_CRC_MODE) | 183 | #define NCAPS (USB_CDC_NCM_NCAP_ETH_FILTER | USB_CDC_NCM_NCAP_CRC_MODE) |
184 | 184 | ||
185 | static struct usb_cdc_ncm_desc ncm_desc = { | 185 | static struct usb_cdc_ncm_desc ncm_desc __initdata = { |
186 | .bLength = sizeof ncm_desc, | 186 | .bLength = sizeof ncm_desc, |
187 | .bDescriptorType = USB_DT_CS_INTERFACE, | 187 | .bDescriptorType = USB_DT_CS_INTERFACE, |
188 | .bDescriptorSubType = USB_CDC_NCM_TYPE, | 188 | .bDescriptorSubType = USB_CDC_NCM_TYPE, |
@@ -194,7 +194,7 @@ static struct usb_cdc_ncm_desc ncm_desc = { | |||
194 | 194 | ||
195 | /* the default data interface has no endpoints ... */ | 195 | /* the default data interface has no endpoints ... */ |
196 | 196 | ||
197 | static struct usb_interface_descriptor ncm_data_nop_intf = { | 197 | static struct usb_interface_descriptor ncm_data_nop_intf __initdata = { |
198 | .bLength = sizeof ncm_data_nop_intf, | 198 | .bLength = sizeof ncm_data_nop_intf, |
199 | .bDescriptorType = USB_DT_INTERFACE, | 199 | .bDescriptorType = USB_DT_INTERFACE, |
200 | 200 | ||
@@ -209,7 +209,7 @@ static struct usb_interface_descriptor ncm_data_nop_intf = { | |||
209 | 209 | ||
210 | /* ... but the "real" data interface has two bulk endpoints */ | 210 | /* ... but the "real" data interface has two bulk endpoints */ |
211 | 211 | ||
212 | static struct usb_interface_descriptor ncm_data_intf = { | 212 | static struct usb_interface_descriptor ncm_data_intf __initdata = { |
213 | .bLength = sizeof ncm_data_intf, | 213 | .bLength = sizeof ncm_data_intf, |
214 | .bDescriptorType = USB_DT_INTERFACE, | 214 | .bDescriptorType = USB_DT_INTERFACE, |
215 | 215 | ||
@@ -224,7 +224,7 @@ static struct usb_interface_descriptor ncm_data_intf = { | |||
224 | 224 | ||
225 | /* full speed support: */ | 225 | /* full speed support: */ |
226 | 226 | ||
227 | static struct usb_endpoint_descriptor fs_ncm_notify_desc = { | 227 | static struct usb_endpoint_descriptor fs_ncm_notify_desc __initdata = { |
228 | .bLength = USB_DT_ENDPOINT_SIZE, | 228 | .bLength = USB_DT_ENDPOINT_SIZE, |
229 | .bDescriptorType = USB_DT_ENDPOINT, | 229 | .bDescriptorType = USB_DT_ENDPOINT, |
230 | 230 | ||
@@ -234,7 +234,7 @@ static struct usb_endpoint_descriptor fs_ncm_notify_desc = { | |||
234 | .bInterval = NCM_STATUS_INTERVAL_MS, | 234 | .bInterval = NCM_STATUS_INTERVAL_MS, |
235 | }; | 235 | }; |
236 | 236 | ||
237 | static struct usb_endpoint_descriptor fs_ncm_in_desc = { | 237 | static struct usb_endpoint_descriptor fs_ncm_in_desc __initdata = { |
238 | .bLength = USB_DT_ENDPOINT_SIZE, | 238 | .bLength = USB_DT_ENDPOINT_SIZE, |
239 | .bDescriptorType = USB_DT_ENDPOINT, | 239 | .bDescriptorType = USB_DT_ENDPOINT, |
240 | 240 | ||
@@ -242,7 +242,7 @@ static struct usb_endpoint_descriptor fs_ncm_in_desc = { | |||
242 | .bmAttributes = USB_ENDPOINT_XFER_BULK, | 242 | .bmAttributes = USB_ENDPOINT_XFER_BULK, |
243 | }; | 243 | }; |
244 | 244 | ||
245 | static struct usb_endpoint_descriptor fs_ncm_out_desc = { | 245 | static struct usb_endpoint_descriptor fs_ncm_out_desc __initdata = { |
246 | .bLength = USB_DT_ENDPOINT_SIZE, | 246 | .bLength = USB_DT_ENDPOINT_SIZE, |
247 | .bDescriptorType = USB_DT_ENDPOINT, | 247 | .bDescriptorType = USB_DT_ENDPOINT, |
248 | 248 | ||
@@ -250,7 +250,7 @@ static struct usb_endpoint_descriptor fs_ncm_out_desc = { | |||
250 | .bmAttributes = USB_ENDPOINT_XFER_BULK, | 250 | .bmAttributes = USB_ENDPOINT_XFER_BULK, |
251 | }; | 251 | }; |
252 | 252 | ||
253 | static struct usb_descriptor_header *ncm_fs_function[] = { | 253 | static struct usb_descriptor_header *ncm_fs_function[] __initdata = { |
254 | (struct usb_descriptor_header *) &ncm_iad_desc, | 254 | (struct usb_descriptor_header *) &ncm_iad_desc, |
255 | /* CDC NCM control descriptors */ | 255 | /* CDC NCM control descriptors */ |
256 | (struct usb_descriptor_header *) &ncm_control_intf, | 256 | (struct usb_descriptor_header *) &ncm_control_intf, |
@@ -269,7 +269,7 @@ static struct usb_descriptor_header *ncm_fs_function[] = { | |||
269 | 269 | ||
270 | /* high speed support: */ | 270 | /* high speed support: */ |
271 | 271 | ||
272 | static struct usb_endpoint_descriptor hs_ncm_notify_desc = { | 272 | static struct usb_endpoint_descriptor hs_ncm_notify_desc __initdata = { |
273 | .bLength = USB_DT_ENDPOINT_SIZE, | 273 | .bLength = USB_DT_ENDPOINT_SIZE, |
274 | .bDescriptorType = USB_DT_ENDPOINT, | 274 | .bDescriptorType = USB_DT_ENDPOINT, |
275 | 275 | ||
@@ -278,7 +278,7 @@ static struct usb_endpoint_descriptor hs_ncm_notify_desc = { | |||
278 | .wMaxPacketSize = cpu_to_le16(NCM_STATUS_BYTECOUNT), | 278 | .wMaxPacketSize = cpu_to_le16(NCM_STATUS_BYTECOUNT), |
279 | .bInterval = USB_MS_TO_HS_INTERVAL(NCM_STATUS_INTERVAL_MS), | 279 | .bInterval = USB_MS_TO_HS_INTERVAL(NCM_STATUS_INTERVAL_MS), |
280 | }; | 280 | }; |
281 | static struct usb_endpoint_descriptor hs_ncm_in_desc = { | 281 | static struct usb_endpoint_descriptor hs_ncm_in_desc __initdata = { |
282 | .bLength = USB_DT_ENDPOINT_SIZE, | 282 | .bLength = USB_DT_ENDPOINT_SIZE, |
283 | .bDescriptorType = USB_DT_ENDPOINT, | 283 | .bDescriptorType = USB_DT_ENDPOINT, |
284 | 284 | ||
@@ -287,7 +287,7 @@ static struct usb_endpoint_descriptor hs_ncm_in_desc = { | |||
287 | .wMaxPacketSize = cpu_to_le16(512), | 287 | .wMaxPacketSize = cpu_to_le16(512), |
288 | }; | 288 | }; |
289 | 289 | ||
290 | static struct usb_endpoint_descriptor hs_ncm_out_desc = { | 290 | static struct usb_endpoint_descriptor hs_ncm_out_desc __initdata = { |
291 | .bLength = USB_DT_ENDPOINT_SIZE, | 291 | .bLength = USB_DT_ENDPOINT_SIZE, |
292 | .bDescriptorType = USB_DT_ENDPOINT, | 292 | .bDescriptorType = USB_DT_ENDPOINT, |
293 | 293 | ||
@@ -296,7 +296,7 @@ static struct usb_endpoint_descriptor hs_ncm_out_desc = { | |||
296 | .wMaxPacketSize = cpu_to_le16(512), | 296 | .wMaxPacketSize = cpu_to_le16(512), |
297 | }; | 297 | }; |
298 | 298 | ||
299 | static struct usb_descriptor_header *ncm_hs_function[] = { | 299 | static struct usb_descriptor_header *ncm_hs_function[] __initdata = { |
300 | (struct usb_descriptor_header *) &ncm_iad_desc, | 300 | (struct usb_descriptor_header *) &ncm_iad_desc, |
301 | /* CDC NCM control descriptors */ | 301 | /* CDC NCM control descriptors */ |
302 | (struct usb_descriptor_header *) &ncm_control_intf, | 302 | (struct usb_descriptor_header *) &ncm_control_intf, |
@@ -1152,7 +1152,7 @@ static void ncm_close(struct gether *geth) | |||
1152 | 1152 | ||
1153 | /* ethernet function driver setup/binding */ | 1153 | /* ethernet function driver setup/binding */ |
1154 | 1154 | ||
1155 | static int | 1155 | static int __init |
1156 | ncm_bind(struct usb_configuration *c, struct usb_function *f) | 1156 | ncm_bind(struct usb_configuration *c, struct usb_function *f) |
1157 | { | 1157 | { |
1158 | struct usb_composite_dev *cdev = c->cdev; | 1158 | struct usb_composite_dev *cdev = c->cdev; |
@@ -1287,7 +1287,7 @@ ncm_unbind(struct usb_configuration *c, struct usb_function *f) | |||
1287 | * Caller must have called @gether_setup(). Caller is also responsible | 1287 | * Caller must have called @gether_setup(). Caller is also responsible |
1288 | * for calling @gether_cleanup() before module unload. | 1288 | * for calling @gether_cleanup() before module unload. |
1289 | */ | 1289 | */ |
1290 | int ncm_bind_config(struct usb_configuration *c, u8 ethaddr[ETH_ALEN], | 1290 | int __init ncm_bind_config(struct usb_configuration *c, u8 ethaddr[ETH_ALEN], |
1291 | struct eth_dev *dev) | 1291 | struct eth_dev *dev) |
1292 | { | 1292 | { |
1293 | struct f_ncm *ncm; | 1293 | struct f_ncm *ncm; |
diff --git a/drivers/usb/gadget/f_uac1.c b/drivers/usb/gadget/f_uac1.c index e11f6cdbe27f..fa8ea4ea00c1 100644 --- a/drivers/usb/gadget/f_uac1.c +++ b/drivers/usb/gadget/f_uac1.c | |||
@@ -46,7 +46,7 @@ static int generic_get_cmd(struct usb_audio_control *con, u8 cmd); | |||
46 | #define F_AUDIO_NUM_INTERFACES 2 | 46 | #define F_AUDIO_NUM_INTERFACES 2 |
47 | 47 | ||
48 | /* B.3.1 Standard AC Interface Descriptor */ | 48 | /* B.3.1 Standard AC Interface Descriptor */ |
49 | static struct usb_interface_descriptor ac_interface_desc = { | 49 | static struct usb_interface_descriptor ac_interface_desc __initdata = { |
50 | .bLength = USB_DT_INTERFACE_SIZE, | 50 | .bLength = USB_DT_INTERFACE_SIZE, |
51 | .bDescriptorType = USB_DT_INTERFACE, | 51 | .bDescriptorType = USB_DT_INTERFACE, |
52 | .bNumEndpoints = 0, | 52 | .bNumEndpoints = 0, |
@@ -188,7 +188,7 @@ static struct usb_endpoint_descriptor as_out_ep_desc = { | |||
188 | }; | 188 | }; |
189 | 189 | ||
190 | /* Class-specific AS ISO OUT Endpoint Descriptor */ | 190 | /* Class-specific AS ISO OUT Endpoint Descriptor */ |
191 | static struct uac_iso_endpoint_descriptor as_iso_out_desc = { | 191 | static struct uac_iso_endpoint_descriptor as_iso_out_desc __initdata = { |
192 | .bLength = UAC_ISO_ENDPOINT_DESC_SIZE, | 192 | .bLength = UAC_ISO_ENDPOINT_DESC_SIZE, |
193 | .bDescriptorType = USB_DT_CS_ENDPOINT, | 193 | .bDescriptorType = USB_DT_CS_ENDPOINT, |
194 | .bDescriptorSubtype = UAC_EP_GENERAL, | 194 | .bDescriptorSubtype = UAC_EP_GENERAL, |
@@ -197,7 +197,7 @@ static struct uac_iso_endpoint_descriptor as_iso_out_desc = { | |||
197 | .wLockDelay = __constant_cpu_to_le16(1), | 197 | .wLockDelay = __constant_cpu_to_le16(1), |
198 | }; | 198 | }; |
199 | 199 | ||
200 | static struct usb_descriptor_header *f_audio_desc[] = { | 200 | static struct usb_descriptor_header *f_audio_desc[] __initdata = { |
201 | (struct usb_descriptor_header *)&ac_interface_desc, | 201 | (struct usb_descriptor_header *)&ac_interface_desc, |
202 | (struct usb_descriptor_header *)&ac_header_desc, | 202 | (struct usb_descriptor_header *)&ac_header_desc, |
203 | 203 | ||
@@ -625,7 +625,7 @@ static void f_audio_build_desc(struct f_audio *audio) | |||
625 | } | 625 | } |
626 | 626 | ||
627 | /* audio function driver setup/binding */ | 627 | /* audio function driver setup/binding */ |
628 | static int | 628 | static int __init |
629 | f_audio_bind(struct usb_configuration *c, struct usb_function *f) | 629 | f_audio_bind(struct usb_configuration *c, struct usb_function *f) |
630 | { | 630 | { |
631 | struct usb_composite_dev *cdev = c->cdev; | 631 | struct usb_composite_dev *cdev = c->cdev; |
@@ -695,7 +695,7 @@ static int generic_get_cmd(struct usb_audio_control *con, u8 cmd) | |||
695 | } | 695 | } |
696 | 696 | ||
697 | /* Todo: add more control selecotor dynamically */ | 697 | /* Todo: add more control selecotor dynamically */ |
698 | int control_selector_init(struct f_audio *audio) | 698 | int __init control_selector_init(struct f_audio *audio) |
699 | { | 699 | { |
700 | INIT_LIST_HEAD(&audio->cs); | 700 | INIT_LIST_HEAD(&audio->cs); |
701 | list_add(&feature_unit.list, &audio->cs); | 701 | list_add(&feature_unit.list, &audio->cs); |
@@ -719,7 +719,7 @@ int control_selector_init(struct f_audio *audio) | |||
719 | * | 719 | * |
720 | * Returns zero on success, else negative errno. | 720 | * Returns zero on success, else negative errno. |
721 | */ | 721 | */ |
722 | int audio_bind_config(struct usb_configuration *c) | 722 | int __init audio_bind_config(struct usb_configuration *c) |
723 | { | 723 | { |
724 | struct f_audio *audio; | 724 | struct f_audio *audio; |
725 | int status; | 725 | int status; |
diff --git a/drivers/usb/gadget/f_uac2.c b/drivers/usb/gadget/f_uac2.c index 346700c7d4b2..03c1fb686644 100644 --- a/drivers/usb/gadget/f_uac2.c +++ b/drivers/usb/gadget/f_uac2.c | |||
@@ -912,7 +912,7 @@ free_ep(struct uac2_rtd_params *prm, struct usb_ep *ep) | |||
912 | "%s:%d Error!\n", __func__, __LINE__); | 912 | "%s:%d Error!\n", __func__, __LINE__); |
913 | } | 913 | } |
914 | 914 | ||
915 | static int | 915 | static int __init |
916 | afunc_bind(struct usb_configuration *cfg, struct usb_function *fn) | 916 | afunc_bind(struct usb_configuration *cfg, struct usb_function *fn) |
917 | { | 917 | { |
918 | struct audio_dev *agdev = func_to_agdev(fn); | 918 | struct audio_dev *agdev = func_to_agdev(fn); |
diff --git a/drivers/usb/gadget/f_uvc.c b/drivers/usb/gadget/f_uvc.c index 9a2e96919c12..38dcedddc52c 100644 --- a/drivers/usb/gadget/f_uvc.c +++ b/drivers/usb/gadget/f_uvc.c | |||
@@ -75,7 +75,7 @@ static struct usb_gadget_strings *uvc_function_strings[] = { | |||
75 | 75 | ||
76 | #define UVC_STATUS_MAX_PACKET_SIZE 16 /* 16 bytes status */ | 76 | #define UVC_STATUS_MAX_PACKET_SIZE 16 /* 16 bytes status */ |
77 | 77 | ||
78 | static struct usb_interface_assoc_descriptor uvc_iad = { | 78 | static struct usb_interface_assoc_descriptor uvc_iad __initdata = { |
79 | .bLength = sizeof(uvc_iad), | 79 | .bLength = sizeof(uvc_iad), |
80 | .bDescriptorType = USB_DT_INTERFACE_ASSOCIATION, | 80 | .bDescriptorType = USB_DT_INTERFACE_ASSOCIATION, |
81 | .bFirstInterface = 0, | 81 | .bFirstInterface = 0, |
@@ -86,7 +86,7 @@ static struct usb_interface_assoc_descriptor uvc_iad = { | |||
86 | .iFunction = 0, | 86 | .iFunction = 0, |
87 | }; | 87 | }; |
88 | 88 | ||
89 | static struct usb_interface_descriptor uvc_control_intf = { | 89 | static struct usb_interface_descriptor uvc_control_intf __initdata = { |
90 | .bLength = USB_DT_INTERFACE_SIZE, | 90 | .bLength = USB_DT_INTERFACE_SIZE, |
91 | .bDescriptorType = USB_DT_INTERFACE, | 91 | .bDescriptorType = USB_DT_INTERFACE, |
92 | .bInterfaceNumber = UVC_INTF_VIDEO_CONTROL, | 92 | .bInterfaceNumber = UVC_INTF_VIDEO_CONTROL, |
@@ -98,7 +98,7 @@ static struct usb_interface_descriptor uvc_control_intf = { | |||
98 | .iInterface = 0, | 98 | .iInterface = 0, |
99 | }; | 99 | }; |
100 | 100 | ||
101 | static struct usb_endpoint_descriptor uvc_control_ep = { | 101 | static struct usb_endpoint_descriptor uvc_control_ep __initdata = { |
102 | .bLength = USB_DT_ENDPOINT_SIZE, | 102 | .bLength = USB_DT_ENDPOINT_SIZE, |
103 | .bDescriptorType = USB_DT_ENDPOINT, | 103 | .bDescriptorType = USB_DT_ENDPOINT, |
104 | .bEndpointAddress = USB_DIR_IN, | 104 | .bEndpointAddress = USB_DIR_IN, |
@@ -107,7 +107,7 @@ static struct usb_endpoint_descriptor uvc_control_ep = { | |||
107 | .bInterval = 8, | 107 | .bInterval = 8, |
108 | }; | 108 | }; |
109 | 109 | ||
110 | static struct usb_ss_ep_comp_descriptor uvc_ss_control_comp = { | 110 | static struct usb_ss_ep_comp_descriptor uvc_ss_control_comp __initdata = { |
111 | .bLength = sizeof(uvc_ss_control_comp), | 111 | .bLength = sizeof(uvc_ss_control_comp), |
112 | .bDescriptorType = USB_DT_SS_ENDPOINT_COMP, | 112 | .bDescriptorType = USB_DT_SS_ENDPOINT_COMP, |
113 | /* The following 3 values can be tweaked if necessary. */ | 113 | /* The following 3 values can be tweaked if necessary. */ |
@@ -116,14 +116,14 @@ static struct usb_ss_ep_comp_descriptor uvc_ss_control_comp = { | |||
116 | .wBytesPerInterval = cpu_to_le16(UVC_STATUS_MAX_PACKET_SIZE), | 116 | .wBytesPerInterval = cpu_to_le16(UVC_STATUS_MAX_PACKET_SIZE), |
117 | }; | 117 | }; |
118 | 118 | ||
119 | static struct uvc_control_endpoint_descriptor uvc_control_cs_ep = { | 119 | static struct uvc_control_endpoint_descriptor uvc_control_cs_ep __initdata = { |
120 | .bLength = UVC_DT_CONTROL_ENDPOINT_SIZE, | 120 | .bLength = UVC_DT_CONTROL_ENDPOINT_SIZE, |
121 | .bDescriptorType = USB_DT_CS_ENDPOINT, | 121 | .bDescriptorType = USB_DT_CS_ENDPOINT, |
122 | .bDescriptorSubType = UVC_EP_INTERRUPT, | 122 | .bDescriptorSubType = UVC_EP_INTERRUPT, |
123 | .wMaxTransferSize = cpu_to_le16(UVC_STATUS_MAX_PACKET_SIZE), | 123 | .wMaxTransferSize = cpu_to_le16(UVC_STATUS_MAX_PACKET_SIZE), |
124 | }; | 124 | }; |
125 | 125 | ||
126 | static struct usb_interface_descriptor uvc_streaming_intf_alt0 = { | 126 | static struct usb_interface_descriptor uvc_streaming_intf_alt0 __initdata = { |
127 | .bLength = USB_DT_INTERFACE_SIZE, | 127 | .bLength = USB_DT_INTERFACE_SIZE, |
128 | .bDescriptorType = USB_DT_INTERFACE, | 128 | .bDescriptorType = USB_DT_INTERFACE, |
129 | .bInterfaceNumber = UVC_INTF_VIDEO_STREAMING, | 129 | .bInterfaceNumber = UVC_INTF_VIDEO_STREAMING, |
@@ -135,7 +135,7 @@ static struct usb_interface_descriptor uvc_streaming_intf_alt0 = { | |||
135 | .iInterface = 0, | 135 | .iInterface = 0, |
136 | }; | 136 | }; |
137 | 137 | ||
138 | static struct usb_interface_descriptor uvc_streaming_intf_alt1 = { | 138 | static struct usb_interface_descriptor uvc_streaming_intf_alt1 __initdata = { |
139 | .bLength = USB_DT_INTERFACE_SIZE, | 139 | .bLength = USB_DT_INTERFACE_SIZE, |
140 | .bDescriptorType = USB_DT_INTERFACE, | 140 | .bDescriptorType = USB_DT_INTERFACE, |
141 | .bInterfaceNumber = UVC_INTF_VIDEO_STREAMING, | 141 | .bInterfaceNumber = UVC_INTF_VIDEO_STREAMING, |
@@ -147,7 +147,7 @@ static struct usb_interface_descriptor uvc_streaming_intf_alt1 = { | |||
147 | .iInterface = 0, | 147 | .iInterface = 0, |
148 | }; | 148 | }; |
149 | 149 | ||
150 | static struct usb_endpoint_descriptor uvc_fs_streaming_ep = { | 150 | static struct usb_endpoint_descriptor uvc_fs_streaming_ep __initdata = { |
151 | .bLength = USB_DT_ENDPOINT_SIZE, | 151 | .bLength = USB_DT_ENDPOINT_SIZE, |
152 | .bDescriptorType = USB_DT_ENDPOINT, | 152 | .bDescriptorType = USB_DT_ENDPOINT, |
153 | .bEndpointAddress = USB_DIR_IN, | 153 | .bEndpointAddress = USB_DIR_IN, |
@@ -160,7 +160,7 @@ static struct usb_endpoint_descriptor uvc_fs_streaming_ep = { | |||
160 | .bInterval = 0, | 160 | .bInterval = 0, |
161 | }; | 161 | }; |
162 | 162 | ||
163 | static struct usb_endpoint_descriptor uvc_hs_streaming_ep = { | 163 | static struct usb_endpoint_descriptor uvc_hs_streaming_ep __initdata = { |
164 | .bLength = USB_DT_ENDPOINT_SIZE, | 164 | .bLength = USB_DT_ENDPOINT_SIZE, |
165 | .bDescriptorType = USB_DT_ENDPOINT, | 165 | .bDescriptorType = USB_DT_ENDPOINT, |
166 | .bEndpointAddress = USB_DIR_IN, | 166 | .bEndpointAddress = USB_DIR_IN, |
@@ -173,7 +173,7 @@ static struct usb_endpoint_descriptor uvc_hs_streaming_ep = { | |||
173 | .bInterval = 0, | 173 | .bInterval = 0, |
174 | }; | 174 | }; |
175 | 175 | ||
176 | static struct usb_endpoint_descriptor uvc_ss_streaming_ep = { | 176 | static struct usb_endpoint_descriptor uvc_ss_streaming_ep __initdata = { |
177 | .bLength = USB_DT_ENDPOINT_SIZE, | 177 | .bLength = USB_DT_ENDPOINT_SIZE, |
178 | .bDescriptorType = USB_DT_ENDPOINT, | 178 | .bDescriptorType = USB_DT_ENDPOINT, |
179 | 179 | ||
@@ -187,7 +187,7 @@ static struct usb_endpoint_descriptor uvc_ss_streaming_ep = { | |||
187 | .bInterval = 0, | 187 | .bInterval = 0, |
188 | }; | 188 | }; |
189 | 189 | ||
190 | static struct usb_ss_ep_comp_descriptor uvc_ss_streaming_comp = { | 190 | static struct usb_ss_ep_comp_descriptor uvc_ss_streaming_comp __initdata = { |
191 | .bLength = sizeof(uvc_ss_streaming_comp), | 191 | .bLength = sizeof(uvc_ss_streaming_comp), |
192 | .bDescriptorType = USB_DT_SS_ENDPOINT_COMP, | 192 | .bDescriptorType = USB_DT_SS_ENDPOINT_COMP, |
193 | /* The following 3 values can be tweaked if necessary. */ | 193 | /* The following 3 values can be tweaked if necessary. */ |
@@ -441,7 +441,7 @@ uvc_register_video(struct uvc_device *uvc) | |||
441 | } \ | 441 | } \ |
442 | } while (0) | 442 | } while (0) |
443 | 443 | ||
444 | static struct usb_descriptor_header ** | 444 | static struct usb_descriptor_header ** __init |
445 | uvc_copy_descriptors(struct uvc_device *uvc, enum usb_device_speed speed) | 445 | uvc_copy_descriptors(struct uvc_device *uvc, enum usb_device_speed speed) |
446 | { | 446 | { |
447 | struct uvc_input_header_descriptor *uvc_streaming_header; | 447 | struct uvc_input_header_descriptor *uvc_streaming_header; |
@@ -582,7 +582,7 @@ uvc_function_unbind(struct usb_configuration *c, struct usb_function *f) | |||
582 | kfree(uvc); | 582 | kfree(uvc); |
583 | } | 583 | } |
584 | 584 | ||
585 | static int | 585 | static int __init |
586 | uvc_function_bind(struct usb_configuration *c, struct usb_function *f) | 586 | uvc_function_bind(struct usb_configuration *c, struct usb_function *f) |
587 | { | 587 | { |
588 | struct usb_composite_dev *cdev = c->cdev; | 588 | struct usb_composite_dev *cdev = c->cdev; |
@@ -743,7 +743,7 @@ error: | |||
743 | * Caller must have called @uvc_setup(). Caller is also responsible for | 743 | * Caller must have called @uvc_setup(). Caller is also responsible for |
744 | * calling @uvc_cleanup() before module unload. | 744 | * calling @uvc_cleanup() before module unload. |
745 | */ | 745 | */ |
746 | int | 746 | int __init |
747 | uvc_bind_config(struct usb_configuration *c, | 747 | uvc_bind_config(struct usb_configuration *c, |
748 | const struct uvc_descriptor_header * const *fs_control, | 748 | const struct uvc_descriptor_header * const *fs_control, |
749 | const struct uvc_descriptor_header * const *ss_control, | 749 | const struct uvc_descriptor_header * const *ss_control, |
diff --git a/drivers/usb/gadget/gmidi.c b/drivers/usb/gadget/gmidi.c index f42afefa7b35..e879e2c9f461 100644 --- a/drivers/usb/gadget/gmidi.c +++ b/drivers/usb/gadget/gmidi.c | |||
@@ -128,14 +128,14 @@ static struct usb_configuration midi_config = { | |||
128 | .MaxPower = CONFIG_USB_GADGET_VBUS_DRAW, | 128 | .MaxPower = CONFIG_USB_GADGET_VBUS_DRAW, |
129 | }; | 129 | }; |
130 | 130 | ||
131 | static int midi_bind_config(struct usb_configuration *c) | 131 | static int __init midi_bind_config(struct usb_configuration *c) |
132 | { | 132 | { |
133 | return f_midi_bind_config(c, index, id, | 133 | return f_midi_bind_config(c, index, id, |
134 | in_ports, out_ports, | 134 | in_ports, out_ports, |
135 | buflen, qlen); | 135 | buflen, qlen); |
136 | } | 136 | } |
137 | 137 | ||
138 | static int midi_bind(struct usb_composite_dev *cdev) | 138 | static int __init midi_bind(struct usb_composite_dev *cdev) |
139 | { | 139 | { |
140 | int status; | 140 | int status; |
141 | 141 | ||
diff --git a/drivers/usb/gadget/hid.c b/drivers/usb/gadget/hid.c index dc70b1585e45..c36260ea8bf2 100644 --- a/drivers/usb/gadget/hid.c +++ b/drivers/usb/gadget/hid.c | |||
@@ -111,7 +111,7 @@ static struct usb_gadget_strings *dev_strings[] = { | |||
111 | 111 | ||
112 | /****************************** Configurations ******************************/ | 112 | /****************************** Configurations ******************************/ |
113 | 113 | ||
114 | static int do_config(struct usb_configuration *c) | 114 | static int __init do_config(struct usb_configuration *c) |
115 | { | 115 | { |
116 | struct hidg_func_node *e; | 116 | struct hidg_func_node *e; |
117 | int func = 0, status = 0; | 117 | int func = 0, status = 0; |
@@ -139,7 +139,7 @@ static struct usb_configuration config_driver = { | |||
139 | 139 | ||
140 | /****************************** Gadget Bind ******************************/ | 140 | /****************************** Gadget Bind ******************************/ |
141 | 141 | ||
142 | static int hid_bind(struct usb_composite_dev *cdev) | 142 | static int __init hid_bind(struct usb_composite_dev *cdev) |
143 | { | 143 | { |
144 | struct usb_gadget *gadget = cdev->gadget; | 144 | struct usb_gadget *gadget = cdev->gadget; |
145 | struct list_head *tmp; | 145 | struct list_head *tmp; |
@@ -183,7 +183,7 @@ static int __exit hid_unbind(struct usb_composite_dev *cdev) | |||
183 | return 0; | 183 | return 0; |
184 | } | 184 | } |
185 | 185 | ||
186 | static int hidg_plat_driver_probe(struct platform_device *pdev) | 186 | static int __init hidg_plat_driver_probe(struct platform_device *pdev) |
187 | { | 187 | { |
188 | struct hidg_func_descriptor *func = pdev->dev.platform_data; | 188 | struct hidg_func_descriptor *func = pdev->dev.platform_data; |
189 | struct hidg_func_node *entry; | 189 | struct hidg_func_node *entry; |
diff --git a/drivers/usb/gadget/mass_storage.c b/drivers/usb/gadget/mass_storage.c index 9f6025cd1a63..fd26fc84919b 100644 --- a/drivers/usb/gadget/mass_storage.c +++ b/drivers/usb/gadget/mass_storage.c | |||
@@ -113,7 +113,7 @@ static int msg_thread_exits(struct fsg_common *common) | |||
113 | return 0; | 113 | return 0; |
114 | } | 114 | } |
115 | 115 | ||
116 | static int msg_do_config(struct usb_configuration *c) | 116 | static int __init msg_do_config(struct usb_configuration *c) |
117 | { | 117 | { |
118 | static const struct fsg_operations ops = { | 118 | static const struct fsg_operations ops = { |
119 | .thread_exits = msg_thread_exits, | 119 | .thread_exits = msg_thread_exits, |
@@ -150,7 +150,7 @@ static struct usb_configuration msg_config_driver = { | |||
150 | 150 | ||
151 | /****************************** Gadget Bind ******************************/ | 151 | /****************************** Gadget Bind ******************************/ |
152 | 152 | ||
153 | static int msg_bind(struct usb_composite_dev *cdev) | 153 | static int __init msg_bind(struct usb_composite_dev *cdev) |
154 | { | 154 | { |
155 | int status; | 155 | int status; |
156 | 156 | ||
diff --git a/drivers/usb/gadget/multi.c b/drivers/usb/gadget/multi.c index fcc536671b9c..4a45e80c6e38 100644 --- a/drivers/usb/gadget/multi.c +++ b/drivers/usb/gadget/multi.c | |||
@@ -143,7 +143,7 @@ static struct eth_dev *the_dev; | |||
143 | #ifdef USB_ETH_RNDIS | 143 | #ifdef USB_ETH_RNDIS |
144 | static struct usb_function *f_acm_rndis; | 144 | static struct usb_function *f_acm_rndis; |
145 | 145 | ||
146 | static int rndis_do_config(struct usb_configuration *c) | 146 | static __init int rndis_do_config(struct usb_configuration *c) |
147 | { | 147 | { |
148 | int ret; | 148 | int ret; |
149 | 149 | ||
@@ -207,7 +207,7 @@ static int rndis_config_register(struct usb_composite_dev *cdev) | |||
207 | #ifdef CONFIG_USB_G_MULTI_CDC | 207 | #ifdef CONFIG_USB_G_MULTI_CDC |
208 | static struct usb_function *f_acm_multi; | 208 | static struct usb_function *f_acm_multi; |
209 | 209 | ||
210 | static int cdc_do_config(struct usb_configuration *c) | 210 | static __init int cdc_do_config(struct usb_configuration *c) |
211 | { | 211 | { |
212 | int ret; | 212 | int ret; |
213 | 213 | ||
diff --git a/drivers/usb/gadget/ncm.c b/drivers/usb/gadget/ncm.c index 9a7c859388d5..3b02fd4649ce 100644 --- a/drivers/usb/gadget/ncm.c +++ b/drivers/usb/gadget/ncm.c | |||
@@ -116,7 +116,7 @@ static u8 hostaddr[ETH_ALEN]; | |||
116 | 116 | ||
117 | /*-------------------------------------------------------------------------*/ | 117 | /*-------------------------------------------------------------------------*/ |
118 | 118 | ||
119 | static int ncm_do_config(struct usb_configuration *c) | 119 | static int __init ncm_do_config(struct usb_configuration *c) |
120 | { | 120 | { |
121 | /* FIXME alloc iConfiguration string, set it in c->strings */ | 121 | /* FIXME alloc iConfiguration string, set it in c->strings */ |
122 | 122 | ||
@@ -138,7 +138,7 @@ static struct usb_configuration ncm_config_driver = { | |||
138 | 138 | ||
139 | /*-------------------------------------------------------------------------*/ | 139 | /*-------------------------------------------------------------------------*/ |
140 | 140 | ||
141 | static int gncm_bind(struct usb_composite_dev *cdev) | 141 | static int __init gncm_bind(struct usb_composite_dev *cdev) |
142 | { | 142 | { |
143 | struct usb_gadget *gadget = cdev->gadget; | 143 | struct usb_gadget *gadget = cdev->gadget; |
144 | int status; | 144 | int status; |
diff --git a/drivers/usb/gadget/nokia.c b/drivers/usb/gadget/nokia.c index 6f860b8dc648..3b344b41a167 100644 --- a/drivers/usb/gadget/nokia.c +++ b/drivers/usb/gadget/nokia.c | |||
@@ -127,7 +127,7 @@ static struct usb_configuration nokia_config_100ma_driver = { | |||
127 | 127 | ||
128 | static struct usb_function_instance *fi_acm; | 128 | static struct usb_function_instance *fi_acm; |
129 | 129 | ||
130 | static int nokia_bind_config(struct usb_configuration *c) | 130 | static int __init nokia_bind_config(struct usb_configuration *c) |
131 | { | 131 | { |
132 | struct usb_function *f_acm; | 132 | struct usb_function *f_acm; |
133 | int status = 0; | 133 | int status = 0; |
@@ -170,7 +170,7 @@ err_conf: | |||
170 | return status; | 170 | return status; |
171 | } | 171 | } |
172 | 172 | ||
173 | static int nokia_bind(struct usb_composite_dev *cdev) | 173 | static int __init nokia_bind(struct usb_composite_dev *cdev) |
174 | { | 174 | { |
175 | struct usb_gadget *gadget = cdev->gadget; | 175 | struct usb_gadget *gadget = cdev->gadget; |
176 | int status; | 176 | int status; |
diff --git a/drivers/usb/gadget/printer.c b/drivers/usb/gadget/printer.c index 2ecf3b1a112b..bf7a56b6d48a 100644 --- a/drivers/usb/gadget/printer.c +++ b/drivers/usb/gadget/printer.c | |||
@@ -978,7 +978,7 @@ unknown: | |||
978 | return value; | 978 | return value; |
979 | } | 979 | } |
980 | 980 | ||
981 | static int printer_func_bind(struct usb_configuration *c, | 981 | static int __init printer_func_bind(struct usb_configuration *c, |
982 | struct usb_function *f) | 982 | struct usb_function *f) |
983 | { | 983 | { |
984 | struct printer_dev *dev = container_of(f, struct printer_dev, function); | 984 | struct printer_dev *dev = container_of(f, struct printer_dev, function); |
@@ -1104,7 +1104,7 @@ static struct usb_configuration printer_cfg_driver = { | |||
1104 | .bmAttributes = USB_CONFIG_ATT_ONE | USB_CONFIG_ATT_SELFPOWER, | 1104 | .bmAttributes = USB_CONFIG_ATT_ONE | USB_CONFIG_ATT_SELFPOWER, |
1105 | }; | 1105 | }; |
1106 | 1106 | ||
1107 | static int printer_bind_config(struct usb_configuration *c) | 1107 | static int __init printer_bind_config(struct usb_configuration *c) |
1108 | { | 1108 | { |
1109 | struct usb_gadget *gadget = c->cdev->gadget; | 1109 | struct usb_gadget *gadget = c->cdev->gadget; |
1110 | struct printer_dev *dev; | 1110 | struct printer_dev *dev; |
@@ -1225,7 +1225,7 @@ static int printer_unbind(struct usb_composite_dev *cdev) | |||
1225 | return 0; | 1225 | return 0; |
1226 | } | 1226 | } |
1227 | 1227 | ||
1228 | static int printer_bind(struct usb_composite_dev *cdev) | 1228 | static int __init printer_bind(struct usb_composite_dev *cdev) |
1229 | { | 1229 | { |
1230 | int ret; | 1230 | int ret; |
1231 | 1231 | ||
diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c index 812780fe209f..1f5f978d35d5 100644 --- a/drivers/usb/gadget/serial.c +++ b/drivers/usb/gadget/serial.c | |||
@@ -174,7 +174,7 @@ out: | |||
174 | return ret; | 174 | return ret; |
175 | } | 175 | } |
176 | 176 | ||
177 | static int gs_bind(struct usb_composite_dev *cdev) | 177 | static int __init gs_bind(struct usb_composite_dev *cdev) |
178 | { | 178 | { |
179 | int status; | 179 | int status; |
180 | 180 | ||
diff --git a/drivers/usb/gadget/u_uac1.c b/drivers/usb/gadget/u_uac1.c index bca223082867..c7d460f43390 100644 --- a/drivers/usb/gadget/u_uac1.c +++ b/drivers/usb/gadget/u_uac1.c | |||
@@ -301,7 +301,7 @@ static struct gaudio *the_card; | |||
301 | * | 301 | * |
302 | * Returns negative errno, or zero on success | 302 | * Returns negative errno, or zero on success |
303 | */ | 303 | */ |
304 | int gaudio_setup(struct gaudio *card) | 304 | int __init gaudio_setup(struct gaudio *card) |
305 | { | 305 | { |
306 | int ret; | 306 | int ret; |
307 | 307 | ||
diff --git a/drivers/usb/gadget/webcam.c b/drivers/usb/gadget/webcam.c index c79a654f4b07..8cef1e658c29 100644 --- a/drivers/usb/gadget/webcam.c +++ b/drivers/usb/gadget/webcam.c | |||
@@ -323,7 +323,7 @@ static const struct uvc_descriptor_header * const uvc_ss_streaming_cls[] = { | |||
323 | * USB configuration | 323 | * USB configuration |
324 | */ | 324 | */ |
325 | 325 | ||
326 | static int | 326 | static int __init |
327 | webcam_config_bind(struct usb_configuration *c) | 327 | webcam_config_bind(struct usb_configuration *c) |
328 | { | 328 | { |
329 | return uvc_bind_config(c, uvc_fs_control_cls, uvc_ss_control_cls, | 329 | return uvc_bind_config(c, uvc_fs_control_cls, uvc_ss_control_cls, |
@@ -345,7 +345,7 @@ webcam_unbind(struct usb_composite_dev *cdev) | |||
345 | return 0; | 345 | return 0; |
346 | } | 346 | } |
347 | 347 | ||
348 | static int | 348 | static int __init |
349 | webcam_bind(struct usb_composite_dev *cdev) | 349 | webcam_bind(struct usb_composite_dev *cdev) |
350 | { | 350 | { |
351 | int ret; | 351 | int ret; |
diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c index 69ebb4a9c38c..0dd07ae1555d 100644 --- a/drivers/usb/gadget/zero.c +++ b/drivers/usb/gadget/zero.c | |||
@@ -272,7 +272,7 @@ static struct usb_function_instance *func_inst_lb; | |||
272 | module_param_named(qlen, gzero_options.qlen, uint, S_IRUGO|S_IWUSR); | 272 | module_param_named(qlen, gzero_options.qlen, uint, S_IRUGO|S_IWUSR); |
273 | MODULE_PARM_DESC(qlen, "depth of loopback queue"); | 273 | MODULE_PARM_DESC(qlen, "depth of loopback queue"); |
274 | 274 | ||
275 | static int zero_bind(struct usb_composite_dev *cdev) | 275 | static int __init zero_bind(struct usb_composite_dev *cdev) |
276 | { | 276 | { |
277 | struct f_ss_opts *ss_opts; | 277 | struct f_ss_opts *ss_opts; |
278 | struct f_lb_opts *lb_opts; | 278 | struct f_lb_opts *lb_opts; |