aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2012-09-06 14:11:03 -0400
committerFelipe Balbi <balbi@ti.com>2012-09-10 08:34:24 -0400
commitc2ec75c25112c9e0d9053f55ba8cf0a358d4a354 (patch)
treef72a74051893780424654d33c94664496765ee1d /drivers/usb/gadget
parent1e1a27c3258c769ea175780bb28d0c8fead79ff8 (diff)
usb: gadget: push all usb_composite_driver structs into __refdata
As it turns out, Sam's comment was better than I initially assumed. This patch pushes as struct usb_composite_driver data structures into __refdata section to avoid a section missmatch report from modpost because the ->bind() can be marked __init. The only downside is that modpost does not check between ->bind() and other member. However, it is temporary. Cc: Sam Ravnborg <sam@ravnborg.org> Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r--drivers/usb/gadget/acm_ms.c2
-rw-r--r--drivers/usb/gadget/audio.c2
-rw-r--r--drivers/usb/gadget/cdc2.c2
-rw-r--r--drivers/usb/gadget/dbgp.c2
-rw-r--r--drivers/usb/gadget/ether.c2
-rw-r--r--drivers/usb/gadget/file_storage.c2
-rw-r--r--drivers/usb/gadget/g_ffs.c2
-rw-r--r--drivers/usb/gadget/gmidi.c2
-rw-r--r--drivers/usb/gadget/hid.c2
-rw-r--r--drivers/usb/gadget/mass_storage.c2
-rw-r--r--drivers/usb/gadget/multi.c2
-rw-r--r--drivers/usb/gadget/ncm.c2
-rw-r--r--drivers/usb/gadget/nokia.c2
-rw-r--r--drivers/usb/gadget/printer.c2
-rw-r--r--drivers/usb/gadget/serial.c2
-rw-r--r--drivers/usb/gadget/tcm_usb_gadget.c2
-rw-r--r--drivers/usb/gadget/webcam.c2
-rw-r--r--drivers/usb/gadget/zero.c2
18 files changed, 18 insertions, 18 deletions
diff --git a/drivers/usb/gadget/acm_ms.c b/drivers/usb/gadget/acm_ms.c
index 75b8a691fd00..dc5cd51de7d4 100644
--- a/drivers/usb/gadget/acm_ms.c
+++ b/drivers/usb/gadget/acm_ms.c
@@ -232,7 +232,7 @@ static int __exit acm_ms_unbind(struct usb_composite_dev *cdev)
232 return 0; 232 return 0;
233} 233}
234 234
235static struct usb_composite_driver acm_ms_driver = { 235static __refdata struct usb_composite_driver acm_ms_driver = {
236 .name = "g_acm_ms", 236 .name = "g_acm_ms",
237 .dev = &device_desc, 237 .dev = &device_desc,
238 .max_speed = USB_SPEED_SUPER, 238 .max_speed = USB_SPEED_SUPER,
diff --git a/drivers/usb/gadget/audio.c b/drivers/usb/gadget/audio.c
index 98899244860e..e539490e7733 100644
--- a/drivers/usb/gadget/audio.c
+++ b/drivers/usb/gadget/audio.c
@@ -198,7 +198,7 @@ static int __exit audio_unbind(struct usb_composite_dev *cdev)
198 return 0; 198 return 0;
199} 199}
200 200
201static struct usb_composite_driver audio_driver = { 201static __refdata struct usb_composite_driver audio_driver = {
202 .name = "g_audio", 202 .name = "g_audio",
203 .dev = &device_desc, 203 .dev = &device_desc,
204 .strings = audio_strings, 204 .strings = audio_strings,
diff --git a/drivers/usb/gadget/cdc2.c b/drivers/usb/gadget/cdc2.c
index 725550f06fab..00b65ac7a2ef 100644
--- a/drivers/usb/gadget/cdc2.c
+++ b/drivers/usb/gadget/cdc2.c
@@ -232,7 +232,7 @@ static int __exit cdc_unbind(struct usb_composite_dev *cdev)
232 return 0; 232 return 0;
233} 233}
234 234
235static struct usb_composite_driver cdc_driver = { 235static __refdata struct usb_composite_driver cdc_driver = {
236 .name = "g_cdc", 236 .name = "g_cdc",
237 .dev = &device_desc, 237 .dev = &device_desc,
238 .strings = dev_strings, 238 .strings = dev_strings,
diff --git a/drivers/usb/gadget/dbgp.c b/drivers/usb/gadget/dbgp.c
index 19d7bb0df75a..2d2cff3e454c 100644
--- a/drivers/usb/gadget/dbgp.c
+++ b/drivers/usb/gadget/dbgp.c
@@ -402,7 +402,7 @@ fail:
402 return err; 402 return err;
403} 403}
404 404
405static struct usb_gadget_driver dbgp_driver = { 405static __refdata struct usb_gadget_driver dbgp_driver = {
406 .function = "dbgp", 406 .function = "dbgp",
407 .max_speed = USB_SPEED_HIGH, 407 .max_speed = USB_SPEED_HIGH,
408 .unbind = dbgp_unbind, 408 .unbind = dbgp_unbind,
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
index a28f6ffcd0f3..49a7dac06b1d 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -388,7 +388,7 @@ static int __exit eth_unbind(struct usb_composite_dev *cdev)
388 return 0; 388 return 0;
389} 389}
390 390
391static struct usb_composite_driver eth_driver = { 391static __refdata struct usb_composite_driver eth_driver = {
392 .name = "g_ether", 392 .name = "g_ether",
393 .dev = &device_desc, 393 .dev = &device_desc,
394 .strings = dev_strings, 394 .strings = dev_strings,
diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c
index a896d73f7a93..683234bcdced 100644
--- a/drivers/usb/gadget/file_storage.c
+++ b/drivers/usb/gadget/file_storage.c
@@ -3603,7 +3603,7 @@ static void fsg_resume(struct usb_gadget *gadget)
3603 3603
3604/*-------------------------------------------------------------------------*/ 3604/*-------------------------------------------------------------------------*/
3605 3605
3606static struct usb_gadget_driver fsg_driver = { 3606static __refdata struct usb_gadget_driver fsg_driver = {
3607 .max_speed = USB_SPEED_SUPER, 3607 .max_speed = USB_SPEED_SUPER,
3608 .function = (char *) fsg_string_product, 3608 .function = (char *) fsg_string_product,
3609 .unbind = fsg_unbind, 3609 .unbind = fsg_unbind,
diff --git a/drivers/usb/gadget/g_ffs.c b/drivers/usb/gadget/g_ffs.c
index d3ace9002a6a..d1312c404afa 100644
--- a/drivers/usb/gadget/g_ffs.c
+++ b/drivers/usb/gadget/g_ffs.c
@@ -163,7 +163,7 @@ static int gfs_bind(struct usb_composite_dev *cdev);
163static int gfs_unbind(struct usb_composite_dev *cdev); 163static int gfs_unbind(struct usb_composite_dev *cdev);
164static int gfs_do_config(struct usb_configuration *c); 164static int gfs_do_config(struct usb_configuration *c);
165 165
166static struct usb_composite_driver gfs_driver = { 166static __refdata struct usb_composite_driver gfs_driver = {
167 .name = DRIVER_NAME, 167 .name = DRIVER_NAME,
168 .dev = &gfs_dev_desc, 168 .dev = &gfs_dev_desc,
169 .strings = gfs_dev_strings, 169 .strings = gfs_dev_strings,
diff --git a/drivers/usb/gadget/gmidi.c b/drivers/usb/gadget/gmidi.c
index 681bd038b1d8..ae46f69b718a 100644
--- a/drivers/usb/gadget/gmidi.c
+++ b/drivers/usb/gadget/gmidi.c
@@ -184,7 +184,7 @@ static int __init midi_bind(struct usb_composite_dev *cdev)
184 return 0; 184 return 0;
185} 185}
186 186
187static struct usb_composite_driver midi_driver = { 187static __refdata struct usb_composite_driver midi_driver = {
188 .name = (char *) longname, 188 .name = (char *) longname,
189 .dev = &device_desc, 189 .dev = &device_desc,
190 .strings = dev_strings, 190 .strings = dev_strings,
diff --git a/drivers/usb/gadget/hid.c b/drivers/usb/gadget/hid.c
index 3493adf064f5..34e139e700b4 100644
--- a/drivers/usb/gadget/hid.c
+++ b/drivers/usb/gadget/hid.c
@@ -242,7 +242,7 @@ static int __devexit hidg_plat_driver_remove(struct platform_device *pdev)
242/****************************** Some noise ******************************/ 242/****************************** Some noise ******************************/
243 243
244 244
245static struct usb_composite_driver hidg_driver = { 245static __refdata struct usb_composite_driver hidg_driver = {
246 .name = "g_hid", 246 .name = "g_hid",
247 .dev = &device_desc, 247 .dev = &device_desc,
248 .strings = dev_strings, 248 .strings = dev_strings,
diff --git a/drivers/usb/gadget/mass_storage.c b/drivers/usb/gadget/mass_storage.c
index 1f376eba31f6..5df117e3f78d 100644
--- a/drivers/usb/gadget/mass_storage.c
+++ b/drivers/usb/gadget/mass_storage.c
@@ -156,7 +156,7 @@ static int __init msg_bind(struct usb_composite_dev *cdev)
156 156
157/****************************** Some noise ******************************/ 157/****************************** Some noise ******************************/
158 158
159static struct usb_composite_driver msg_driver = { 159static __refdata struct usb_composite_driver msg_driver = {
160 .name = "g_mass_storage", 160 .name = "g_mass_storage",
161 .dev = &msg_device_desc, 161 .dev = &msg_device_desc,
162 .iProduct = DRIVER_DESC, 162 .iProduct = DRIVER_DESC,
diff --git a/drivers/usb/gadget/multi.c b/drivers/usb/gadget/multi.c
index c37fb33a3d1b..7e5852a28a93 100644
--- a/drivers/usb/gadget/multi.c
+++ b/drivers/usb/gadget/multi.c
@@ -338,7 +338,7 @@ static int __exit multi_unbind(struct usb_composite_dev *cdev)
338/****************************** Some noise ******************************/ 338/****************************** Some noise ******************************/
339 339
340 340
341static struct usb_composite_driver multi_driver = { 341static __refdata struct usb_composite_driver multi_driver = {
342 .name = "g_multi", 342 .name = "g_multi",
343 .dev = &device_desc, 343 .dev = &device_desc,
344 .strings = dev_strings, 344 .strings = dev_strings,
diff --git a/drivers/usb/gadget/ncm.c b/drivers/usb/gadget/ncm.c
index 89530034dff1..5079bf659e31 100644
--- a/drivers/usb/gadget/ncm.c
+++ b/drivers/usb/gadget/ncm.c
@@ -215,7 +215,7 @@ static int __exit gncm_unbind(struct usb_composite_dev *cdev)
215 return 0; 215 return 0;
216} 216}
217 217
218static struct usb_composite_driver ncm_driver = { 218static __refdata struct usb_composite_driver ncm_driver = {
219 .name = "g_ncm", 219 .name = "g_ncm",
220 .dev = &device_desc, 220 .dev = &device_desc,
221 .strings = dev_strings, 221 .strings = dev_strings,
diff --git a/drivers/usb/gadget/nokia.c b/drivers/usb/gadget/nokia.c
index c7fb7723c014..936d0afc4527 100644
--- a/drivers/usb/gadget/nokia.c
+++ b/drivers/usb/gadget/nokia.c
@@ -237,7 +237,7 @@ static int __exit nokia_unbind(struct usb_composite_dev *cdev)
237 return 0; 237 return 0;
238} 238}
239 239
240static struct usb_composite_driver nokia_driver = { 240static __refdata struct usb_composite_driver nokia_driver = {
241 .name = "g_nokia", 241 .name = "g_nokia",
242 .dev = &device_desc, 242 .dev = &device_desc,
243 .strings = dev_strings, 243 .strings = dev_strings,
diff --git a/drivers/usb/gadget/printer.c b/drivers/usb/gadget/printer.c
index f1f9290a2f47..0aab51766ce6 100644
--- a/drivers/usb/gadget/printer.c
+++ b/drivers/usb/gadget/printer.c
@@ -1269,7 +1269,7 @@ static int __init printer_bind(struct usb_composite_dev *cdev)
1269 return usb_add_config(cdev, &printer_cfg_driver, printer_bind_config); 1269 return usb_add_config(cdev, &printer_cfg_driver, printer_bind_config);
1270} 1270}
1271 1271
1272static struct usb_composite_driver printer_driver = { 1272static __refdata struct usb_composite_driver printer_driver = {
1273 .name = shortname, 1273 .name = shortname,
1274 .dev = &device_desc, 1274 .dev = &device_desc,
1275 .strings = dev_strings, 1275 .strings = dev_strings,
diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c
index 665c07422c26..7b0b6f40ed07 100644
--- a/drivers/usb/gadget/serial.c
+++ b/drivers/usb/gadget/serial.c
@@ -238,7 +238,7 @@ fail:
238 return status; 238 return status;
239} 239}
240 240
241static struct usb_composite_driver gserial_driver = { 241static __refdata struct usb_composite_driver gserial_driver = {
242 .name = "g_serial", 242 .name = "g_serial",
243 .dev = &device_desc, 243 .dev = &device_desc,
244 .strings = dev_strings, 244 .strings = dev_strings,
diff --git a/drivers/usb/gadget/tcm_usb_gadget.c b/drivers/usb/gadget/tcm_usb_gadget.c
index 5444866e13ef..28fef844a06a 100644
--- a/drivers/usb/gadget/tcm_usb_gadget.c
+++ b/drivers/usb/gadget/tcm_usb_gadget.c
@@ -2436,7 +2436,7 @@ static int usb_target_bind(struct usb_composite_dev *cdev)
2436 return 0; 2436 return 0;
2437} 2437}
2438 2438
2439static struct usb_composite_driver usbg_driver = { 2439static __refdata struct usb_composite_driver usbg_driver = {
2440 .name = "g_target", 2440 .name = "g_target",
2441 .dev = &usbg_device_desc, 2441 .dev = &usbg_device_desc,
2442 .strings = usbg_strings, 2442 .strings = usbg_strings,
diff --git a/drivers/usb/gadget/webcam.c b/drivers/usb/gadget/webcam.c
index 120e134e805e..d946f19482e8 100644
--- a/drivers/usb/gadget/webcam.c
+++ b/drivers/usb/gadget/webcam.c
@@ -390,7 +390,7 @@ error:
390 * Driver 390 * Driver
391 */ 391 */
392 392
393static struct usb_composite_driver webcam_driver = { 393static __refdata struct usb_composite_driver webcam_driver = {
394 .name = "g_webcam", 394 .name = "g_webcam",
395 .dev = &webcam_device_descriptor, 395 .dev = &webcam_device_descriptor,
396 .strings = webcam_device_strings, 396 .strings = webcam_device_strings,
diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c
index 12ad516ada77..5db33cbe755b 100644
--- a/drivers/usb/gadget/zero.c
+++ b/drivers/usb/gadget/zero.c
@@ -334,7 +334,7 @@ static int zero_unbind(struct usb_composite_dev *cdev)
334 return 0; 334 return 0;
335} 335}
336 336
337static struct usb_composite_driver zero_driver = { 337static __refdata struct usb_composite_driver zero_driver = {
338 .name = "zero", 338 .name = "zero",
339 .dev = &device_desc, 339 .dev = &device_desc,
340 .strings = dev_strings, 340 .strings = dev_strings,