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>
13 files changed:
/*-------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------*/
-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 */
{
/* FIXME alloc iConfiguration string, set it in c->strings */
/*-------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------*/
-static int __init audio_bind(struct usb_composite_dev *cdev)
+static int __ref audio_bind(struct usb_composite_dev *cdev)
/*
* We _always_ have both CDC ECM and CDC ACM functions.
*/
/*
* 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)
/*-------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------*/
-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;
{
int gcnum;
struct usb_gadget *gadget = cdev->gadget;
* the first one present. That's to make Microsoft's drivers happy,
* and to follow DOCSIS 1.0 (cable modem standard).
*/
* 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 */
{
/* FIXME alloc iConfiguration string, set it in c->strings */
/*
* We _always_ have an ECM, CDC Subset, or EEM configuration.
*/
/*
* 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 */
{
/* FIXME alloc iConfiguration string, set it in c->strings */
/*-------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------*/
-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;
{
int gcnum;
struct usb_gadget *gadget = cdev->gadget;
/*-------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------*/
-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;
{
struct f_loopback *loop;
int status;
-static struct usb_configuration loopback_driver = {
+static struct usb_configuration loopback_driver = {
.label = "loopback",
.strings = loopback_strings,
.bind = loopback_bind_config,
.label = "loopback",
.strings = loopback_strings,
.bind = loopback_bind_config,
/*-------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------*/
-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;
{
struct f_sourcesink *ss;
int status;
-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;
{
struct fsg_dev *fsg = the_fsg;
int rc;
/*
* Creates an output endpoint, and initializes output ports.
*/
/*
* 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;
{
struct gmidi_device *dev;
struct usb_ep *in_ep, *out_ep;
/****************************** Configurations ******************************/
/****************************** 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;
{
struct hidg_func_node *e;
int func = 0, status = 0;
/****************************** Gadget Bind ******************************/
/****************************** 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;
{
struct usb_gadget *gadget = cdev->gadget;
struct list_head *tmp;
-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,
{
static const struct fsg_operations ops = {
.thread_exits = msg_thread_exits,
/****************************** Gadget Bind ******************************/
/****************************** 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;
{
struct usb_gadget *gadget = cdev->gadget;
int status;
set_gadget_data(gadget, NULL);
}
set_gadget_data(gadget, NULL);
}
printer_bind(struct usb_gadget *gadget)
{
struct printer_dev *dev;
printer_bind(struct usb_gadget *gadget)
{
struct printer_dev *dev;
/*-------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------*/
-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;
{
unsigned i;
int status = 0;
.bmAttributes = USB_CONFIG_ATT_SELFPOWER,
};
.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;
{
int gcnum;
struct usb_gadget *gadget = cdev->gadget;
webcam_config_bind(struct usb_configuration *c)
{
return uvc_bind_config(c, uvc_control_cls, uvc_fs_streaming_cls,
webcam_config_bind(struct usb_configuration *c)
{
return uvc_bind_config(c, uvc_control_cls, uvc_fs_streaming_cls,
webcam_bind(struct usb_composite_dev *cdev)
{
int ret;
webcam_bind(struct usb_composite_dev *cdev)
{
int ret;
/*-------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------*/
-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;
{
int gcnum;
struct usb_gadget *gadget = cdev->gadget;