diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-08-12 11:43:55 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-10-22 13:21:26 -0400 |
commit | c9bfff9c98671ad50e4abbfe1ab606a9957f7539 (patch) | |
tree | 68ca78391c78bde1a82000e34eec70866f5c956e /drivers/usb/gadget/hid.c | |
parent | 07a18bd716ed5dea336429404b132568cfaaef95 (diff) |
usb gadget: don't save bind callback in struct usb_configuration
The bind function is most of the time only called at init time so there
is no need to save a pointer to it in the configuration structure.
This fixes many section mismatches reported by modpost.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
[m.nazarewicz@samsung.com: updated for -next]
Signed-off-by: Michał Nazarewicz <m.nazarewicz@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/hid.c')
-rw-r--r-- | drivers/usb/gadget/hid.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/gadget/hid.c b/drivers/usb/gadget/hid.c index 77f495212fb9..2523e54097bd 100644 --- a/drivers/usb/gadget/hid.c +++ b/drivers/usb/gadget/hid.c | |||
@@ -148,7 +148,6 @@ static int __init do_config(struct usb_configuration *c) | |||
148 | 148 | ||
149 | static struct usb_configuration config_driver = { | 149 | static struct usb_configuration config_driver = { |
150 | .label = "HID Gadget", | 150 | .label = "HID Gadget", |
151 | .bind = do_config, | ||
152 | .bConfigurationValue = 1, | 151 | .bConfigurationValue = 1, |
153 | /* .iConfiguration = DYNAMIC */ | 152 | /* .iConfiguration = DYNAMIC */ |
154 | .bmAttributes = USB_CONFIG_ATT_SELFPOWER, | 153 | .bmAttributes = USB_CONFIG_ATT_SELFPOWER, |
@@ -201,7 +200,7 @@ static int __init hid_bind(struct usb_composite_dev *cdev) | |||
201 | device_desc.iProduct = status; | 200 | device_desc.iProduct = status; |
202 | 201 | ||
203 | /* register our configuration */ | 202 | /* register our configuration */ |
204 | status = usb_add_config(cdev, &config_driver); | 203 | status = usb_add_config(cdev, &config_driver, do_config); |
205 | if (status < 0) | 204 | if (status < 0) |
206 | return status; | 205 | return status; |
207 | 206 | ||