diff options
| author | Greg Kroah-Hartman <gregkh@suse.de> | 2010-06-21 15:28:01 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-06-21 15:28:01 -0700 |
| commit | 70c9a1a86d66ebabb299bf8542c60b0bc10f66df (patch) | |
| tree | 65b1d804f72bc1af3bb54aae7d7db281df3b935c | |
| parent | 988883492e6fc483249e9d7d8fe3a59b2ed3a5ae (diff) | |
| download | patches-70c9a1a86d66ebabb299bf8542c60b0bc10f66df.tar.gz | |
another usb patch
| -rw-r--r-- | series | 2 | ||||
| -rw-r--r-- | usb/usb-gadget-section-mismatch-warning-fixed.patch | 259 |
2 files changed, 261 insertions, 0 deletions
@@ -167,8 +167,10 @@ usb/usb-gadget-g_serial-inf-file-updated.patch usb/usb-gadget-g_multi-added-documentation-and-inf-files.patch usb/usb-gadget-composite-added-disconnect-callback.patch usb/usb-gadget-f_mass_storage-added-eject-callback.patch +usb/usb-gadget-section-mismatch-warning-fixed.patch # staging stuff is now in the staging-next tree on git.kernel.org + diff --git a/usb/usb-gadget-section-mismatch-warning-fixed.patch b/usb/usb-gadget-section-mismatch-warning-fixed.patch new file mode 100644 index 00000000000000..8fdbf5c016cb80 --- /dev/null +++ b/usb/usb-gadget-section-mismatch-warning-fixed.patch @@ -0,0 +1,259 @@ +From m.nazarewicz@samsung.com Mon Jun 21 15:21:44 2010 +From: Michal Nazarewicz <m.nazarewicz@samsung.com> +Date: Mon, 21 Jun 2010 13:57:04 +0200 +Subject: USB: gadget: section mismatch warning fixed +To: linux-usb@vger.kernel.org +Cc: David Brownell <dbrownell@users.sourceforge.net>, Alan Stern <stern@rowland.harvard.edu>, Bryan Wu <cooloney@kernel.org>, Cliff Cai <cliff.cai@analog.com>, Daniel Mack <daniel@caiaq.de>, Fabien Chouteau <fabien.chouteau@barco.com>, Felipe Balbi <felipe.balbi@nokia.com>, Laurent Pinchart <laurent.pinchart@skynet.be>, Mike Frysinger <vapier@gentoo.org>, Peter Korsgaard <peter.korsgaard@barco.com>, Takashi Iwai <tiwai@suse.de>, Kyungmin Park <kyungmin.park@samsung.com>, Marek Szyprowski <m.szyprowski@samsung.com>, linux-kernel@vger.kernel.org +Message-ID: <662381b24e04af307ec656b1250f4b33aef0d502.1277116502.git.m.nazarewicz@samsung.com> + + +In may gadgets bind and bind like functions were in a init section +as they were only run during initialisation. However, being +callback functions they were referenced from structures in “normal” +sections. Changing the tag from “__init” to “__ref” fixes the +warnings. + +Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com> +Cc: Kyungmin Park <kyungmin.park@samsung.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/gadget/audio.c | 4 ++-- + drivers/usb/gadget/cdc2.c | 4 ++-- + drivers/usb/gadget/ether.c | 6 +++--- + drivers/usb/gadget/f_loopback.c | 4 ++-- + drivers/usb/gadget/f_sourcesink.c | 2 +- + drivers/usb/gadget/file_storage.c | 2 +- + drivers/usb/gadget/gmidi.c | 2 +- + drivers/usb/gadget/hid.c | 4 ++-- + drivers/usb/gadget/mass_storage.c | 4 ++-- + drivers/usb/gadget/printer.c | 2 +- + drivers/usb/gadget/serial.c | 4 ++-- + drivers/usb/gadget/webcam.c | 4 ++-- + drivers/usb/gadget/zero.c | 2 +- + 13 files changed, 22 insertions(+), 22 deletions(-) + +--- a/drivers/usb/gadget/audio.c ++++ b/drivers/usb/gadget/audio.c +@@ -89,7 +89,7 @@ static const struct usb_descriptor_heade + + /*-------------------------------------------------------------------------*/ + +-static int __init audio_do_config(struct usb_configuration *c) ++static int __ref audio_do_config(struct usb_configuration *c) + { + /* FIXME alloc iConfiguration string, set it in c->strings */ + +@@ -113,7 +113,7 @@ static struct usb_configuration audio_co + + /*-------------------------------------------------------------------------*/ + +-static int __init audio_bind(struct usb_composite_dev *cdev) ++static int __ref audio_bind(struct usb_composite_dev *cdev) + { + int gcnum; + int status; +--- a/drivers/usb/gadget/cdc2.c ++++ b/drivers/usb/gadget/cdc2.c +@@ -129,7 +129,7 @@ static u8 hostaddr[ETH_ALEN]; + /* + * We _always_ have both CDC ECM and CDC ACM functions. + */ +-static int __init cdc_do_config(struct usb_configuration *c) ++static int __ref cdc_do_config(struct usb_configuration *c) + { + int status; + +@@ -159,7 +159,7 @@ static struct usb_configuration cdc_conf + + /*-------------------------------------------------------------------------*/ + +-static int __init cdc_bind(struct usb_composite_dev *cdev) ++static int __ref cdc_bind(struct usb_composite_dev *cdev) + { + int gcnum; + struct usb_gadget *gadget = cdev->gadget; +--- a/drivers/usb/gadget/ether.c ++++ b/drivers/usb/gadget/ether.c +@@ -237,7 +237,7 @@ static u8 hostaddr[ETH_ALEN]; + * the first one present. That's to make Microsoft's drivers happy, + * and to follow DOCSIS 1.0 (cable modem standard). + */ +-static int __init rndis_do_config(struct usb_configuration *c) ++static int __ref rndis_do_config(struct usb_configuration *c) + { + /* FIXME alloc iConfiguration string, set it in c->strings */ + +@@ -270,7 +270,7 @@ MODULE_PARM_DESC(use_eem, "use CDC EEM m + /* + * We _always_ have an ECM, CDC Subset, or EEM configuration. + */ +-static int __init eth_do_config(struct usb_configuration *c) ++static int __ref eth_do_config(struct usb_configuration *c) + { + /* FIXME alloc iConfiguration string, set it in c->strings */ + +@@ -297,7 +297,7 @@ static struct usb_configuration eth_conf + + /*-------------------------------------------------------------------------*/ + +-static int __init eth_bind(struct usb_composite_dev *cdev) ++static int __ref eth_bind(struct usb_composite_dev *cdev) + { + int gcnum; + struct usb_gadget *gadget = cdev->gadget; +--- a/drivers/usb/gadget/f_loopback.c ++++ b/drivers/usb/gadget/f_loopback.c +@@ -324,7 +324,7 @@ static void loopback_disable(struct usb_ + + /*-------------------------------------------------------------------------*/ + +-static int __init loopback_bind_config(struct usb_configuration *c) ++static int __ref loopback_bind_config(struct usb_configuration *c) + { + struct f_loopback *loop; + int status; +@@ -346,7 +346,7 @@ static int __init loopback_bind_config(s + return status; + } + +-static struct usb_configuration loopback_driver = { ++static struct usb_configuration loopback_driver = { + .label = "loopback", + .strings = loopback_strings, + .bind = loopback_bind_config, +--- a/drivers/usb/gadget/f_sourcesink.c ++++ b/drivers/usb/gadget/f_sourcesink.c +@@ -404,7 +404,7 @@ static void sourcesink_disable(struct us + + /*-------------------------------------------------------------------------*/ + +-static int __init sourcesink_bind_config(struct usb_configuration *c) ++static int __ref sourcesink_bind_config(struct usb_configuration *c) + { + struct f_sourcesink *ss; + int status; +--- a/drivers/usb/gadget/file_storage.c ++++ b/drivers/usb/gadget/file_storage.c +@@ -3335,7 +3335,7 @@ fill_serial: + } + + +-static int __init fsg_bind(struct usb_gadget *gadget) ++static int __ref fsg_bind(struct usb_gadget *gadget) + { + struct fsg_dev *fsg = the_fsg; + int rc; +--- a/drivers/usb/gadget/gmidi.c ++++ b/drivers/usb/gadget/gmidi.c +@@ -1157,7 +1157,7 @@ fail: + /* + * Creates an output endpoint, and initializes output ports. + */ +-static int __init gmidi_bind(struct usb_gadget *gadget) ++static int __ref gmidi_bind(struct usb_gadget *gadget) + { + struct gmidi_device *dev; + struct usb_ep *in_ep, *out_ep; +--- a/drivers/usb/gadget/hid.c ++++ b/drivers/usb/gadget/hid.c +@@ -127,7 +127,7 @@ static struct usb_gadget_strings *dev_st + + /****************************** Configurations ******************************/ + +-static int __init do_config(struct usb_configuration *c) ++static int __ref do_config(struct usb_configuration *c) + { + struct hidg_func_node *e; + int func = 0, status = 0; +@@ -156,7 +156,7 @@ static struct usb_configuration config_d + + /****************************** Gadget Bind ******************************/ + +-static int __init hid_bind(struct usb_composite_dev *cdev) ++static int __ref hid_bind(struct usb_composite_dev *cdev) + { + struct usb_gadget *gadget = cdev->gadget; + struct list_head *tmp; +--- a/drivers/usb/gadget/mass_storage.c ++++ b/drivers/usb/gadget/mass_storage.c +@@ -141,7 +141,7 @@ static int msg_thread_exits(struct fsg_c + return 0; + } + +-static int __init msg_do_config(struct usb_configuration *c) ++static int __ref msg_do_config(struct usb_configuration *c) + { + static const struct fsg_operations ops = { + .thread_exits = msg_thread_exits, +@@ -182,7 +182,7 @@ static struct usb_configuration msg_conf + /****************************** Gadget Bind ******************************/ + + +-static int __init msg_bind(struct usb_composite_dev *cdev) ++static int __ref msg_bind(struct usb_composite_dev *cdev) + { + struct usb_gadget *gadget = cdev->gadget; + int status; +--- a/drivers/usb/gadget/printer.c ++++ b/drivers/usb/gadget/printer.c +@@ -1346,7 +1346,7 @@ printer_unbind(struct usb_gadget *gadget + set_gadget_data(gadget, NULL); + } + +-static int __init ++static int __ref + printer_bind(struct usb_gadget *gadget) + { + struct printer_dev *dev; +--- a/drivers/usb/gadget/serial.c ++++ b/drivers/usb/gadget/serial.c +@@ -137,7 +137,7 @@ MODULE_PARM_DESC(n_ports, "number of por + + /*-------------------------------------------------------------------------*/ + +-static int __init serial_bind_config(struct usb_configuration *c) ++static int __ref serial_bind_config(struct usb_configuration *c) + { + unsigned i; + int status = 0; +@@ -161,7 +161,7 @@ static struct usb_configuration serial_c + .bmAttributes = USB_CONFIG_ATT_SELFPOWER, + }; + +-static int __init gs_bind(struct usb_composite_dev *cdev) ++static int __ref gs_bind(struct usb_composite_dev *cdev) + { + int gcnum; + struct usb_gadget *gadget = cdev->gadget; +--- a/drivers/usb/gadget/webcam.c ++++ b/drivers/usb/gadget/webcam.c +@@ -308,7 +308,7 @@ static const struct uvc_descriptor_heade + * USB configuration + */ + +-static int __init ++static int __ref + webcam_config_bind(struct usb_configuration *c) + { + return uvc_bind_config(c, uvc_control_cls, uvc_fs_streaming_cls, +@@ -330,7 +330,7 @@ webcam_unbind(struct usb_composite_dev * + return 0; + } + +-static int __init ++static int __ref + webcam_bind(struct usb_composite_dev *cdev) + { + int ret; +--- a/drivers/usb/gadget/zero.c ++++ b/drivers/usb/gadget/zero.c +@@ -264,7 +264,7 @@ static void zero_resume(struct usb_compo + + /*-------------------------------------------------------------------------*/ + +-static int __init zero_bind(struct usb_composite_dev *cdev) ++static int __ref zero_bind(struct usb_composite_dev *cdev) + { + int gcnum; + struct usb_gadget *gadget = cdev->gadget; |
