diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2012-09-06 20:11:03 +0200 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-09-10 15:34:24 +0300 |
commit | c2ec75c25112c9e0d9053f55ba8cf0a358d4a354 (patch) | |
tree | f72a74051893780424654d33c94664496765ee1d /drivers/usb/gadget | |
parent | 1e1a27c3258c769ea175780bb28d0c8fead79ff8 (diff) | |
download | linux-c2ec75c25112c9e0d9053f55ba8cf0a358d4a354.tar.gz linux-c2ec75c25112c9e0d9053f55ba8cf0a358d4a354.tar.bz2 linux-c2ec75c25112c9e0d9053f55ba8cf0a358d4a354.zip |
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.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/audio.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/cdc2.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/dbgp.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/ether.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/file_storage.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/g_ffs.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/gmidi.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/hid.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/mass_storage.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/multi.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/ncm.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/nokia.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/printer.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/serial.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/tcm_usb_gadget.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/webcam.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/zero.c | 2 |
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) return 0; } -static struct usb_composite_driver acm_ms_driver = { +static __refdata struct usb_composite_driver acm_ms_driver = { .name = "g_acm_ms", .dev = &device_desc, .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) return 0; } -static struct usb_composite_driver audio_driver = { +static __refdata struct usb_composite_driver audio_driver = { .name = "g_audio", .dev = &device_desc, .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) return 0; } -static struct usb_composite_driver cdc_driver = { +static __refdata struct usb_composite_driver cdc_driver = { .name = "g_cdc", .dev = &device_desc, .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: return err; } -static struct usb_gadget_driver dbgp_driver = { +static __refdata struct usb_gadget_driver dbgp_driver = { .function = "dbgp", .max_speed = USB_SPEED_HIGH, .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) return 0; } -static struct usb_composite_driver eth_driver = { +static __refdata struct usb_composite_driver eth_driver = { .name = "g_ether", .dev = &device_desc, .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) /*-------------------------------------------------------------------------*/ -static struct usb_gadget_driver fsg_driver = { +static __refdata struct usb_gadget_driver fsg_driver = { .max_speed = USB_SPEED_SUPER, .function = (char *) fsg_string_product, .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); static int gfs_unbind(struct usb_composite_dev *cdev); static int gfs_do_config(struct usb_configuration *c); -static struct usb_composite_driver gfs_driver = { +static __refdata struct usb_composite_driver gfs_driver = { .name = DRIVER_NAME, .dev = &gfs_dev_desc, .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) return 0; } -static struct usb_composite_driver midi_driver = { +static __refdata struct usb_composite_driver midi_driver = { .name = (char *) longname, .dev = &device_desc, .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) /****************************** Some noise ******************************/ -static struct usb_composite_driver hidg_driver = { +static __refdata struct usb_composite_driver hidg_driver = { .name = "g_hid", .dev = &device_desc, .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) /****************************** Some noise ******************************/ -static struct usb_composite_driver msg_driver = { +static __refdata struct usb_composite_driver msg_driver = { .name = "g_mass_storage", .dev = &msg_device_desc, .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) /****************************** Some noise ******************************/ -static struct usb_composite_driver multi_driver = { +static __refdata struct usb_composite_driver multi_driver = { .name = "g_multi", .dev = &device_desc, .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) return 0; } -static struct usb_composite_driver ncm_driver = { +static __refdata struct usb_composite_driver ncm_driver = { .name = "g_ncm", .dev = &device_desc, .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) return 0; } -static struct usb_composite_driver nokia_driver = { +static __refdata struct usb_composite_driver nokia_driver = { .name = "g_nokia", .dev = &device_desc, .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) return usb_add_config(cdev, &printer_cfg_driver, printer_bind_config); } -static struct usb_composite_driver printer_driver = { +static __refdata struct usb_composite_driver printer_driver = { .name = shortname, .dev = &device_desc, .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: return status; } -static struct usb_composite_driver gserial_driver = { +static __refdata struct usb_composite_driver gserial_driver = { .name = "g_serial", .dev = &device_desc, .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) return 0; } -static struct usb_composite_driver usbg_driver = { +static __refdata struct usb_composite_driver usbg_driver = { .name = "g_target", .dev = &usbg_device_desc, .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: * Driver */ -static struct usb_composite_driver webcam_driver = { +static __refdata struct usb_composite_driver webcam_driver = { .name = "g_webcam", .dev = &webcam_device_descriptor, .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) return 0; } -static struct usb_composite_driver zero_driver = { +static __refdata struct usb_composite_driver zero_driver = { .name = "zero", .dev = &device_desc, .strings = dev_strings, |