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>
This commit is contained in:
Родитель
1e1a27c325
Коммит
c2ec75c251
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
Загрузка…
Ссылка в новой задаче