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/multi.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/multi.c')
-rw-r--r-- | drivers/usb/gadget/multi.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/usb/gadget/multi.c b/drivers/usb/gadget/multi.c index 91170a02a9a3..d9feced348e3 100644 --- a/drivers/usb/gadget/multi.c +++ b/drivers/usb/gadget/multi.c | |||
@@ -164,7 +164,7 @@ static u8 hostaddr[ETH_ALEN]; | |||
164 | 164 | ||
165 | #ifdef USB_ETH_RNDIS | 165 | #ifdef USB_ETH_RNDIS |
166 | 166 | ||
167 | static __ref int rndis_do_config(struct usb_configuration *c) | 167 | static __init int rndis_do_config(struct usb_configuration *c) |
168 | { | 168 | { |
169 | int ret; | 169 | int ret; |
170 | 170 | ||
@@ -191,7 +191,6 @@ static __ref int rndis_do_config(struct usb_configuration *c) | |||
191 | static int rndis_config_register(struct usb_composite_dev *cdev) | 191 | static int rndis_config_register(struct usb_composite_dev *cdev) |
192 | { | 192 | { |
193 | static struct usb_configuration config = { | 193 | static struct usb_configuration config = { |
194 | .bind = rndis_do_config, | ||
195 | .bConfigurationValue = MULTI_RNDIS_CONFIG_NUM, | 194 | .bConfigurationValue = MULTI_RNDIS_CONFIG_NUM, |
196 | .bmAttributes = USB_CONFIG_ATT_SELFPOWER, | 195 | .bmAttributes = USB_CONFIG_ATT_SELFPOWER, |
197 | }; | 196 | }; |
@@ -199,7 +198,7 @@ static int rndis_config_register(struct usb_composite_dev *cdev) | |||
199 | config.label = strings_dev[MULTI_STRING_RNDIS_CONFIG_IDX].s; | 198 | config.label = strings_dev[MULTI_STRING_RNDIS_CONFIG_IDX].s; |
200 | config.iConfiguration = strings_dev[MULTI_STRING_RNDIS_CONFIG_IDX].id; | 199 | config.iConfiguration = strings_dev[MULTI_STRING_RNDIS_CONFIG_IDX].id; |
201 | 200 | ||
202 | return usb_add_config(cdev, &config); | 201 | return usb_add_config(cdev, &config, rndis_do_config); |
203 | } | 202 | } |
204 | 203 | ||
205 | #else | 204 | #else |
@@ -216,7 +215,7 @@ static int rndis_config_register(struct usb_composite_dev *cdev) | |||
216 | 215 | ||
217 | #ifdef CONFIG_USB_G_MULTI_CDC | 216 | #ifdef CONFIG_USB_G_MULTI_CDC |
218 | 217 | ||
219 | static __ref int cdc_do_config(struct usb_configuration *c) | 218 | static __init int cdc_do_config(struct usb_configuration *c) |
220 | { | 219 | { |
221 | int ret; | 220 | int ret; |
222 | 221 | ||
@@ -243,7 +242,6 @@ static __ref int cdc_do_config(struct usb_configuration *c) | |||
243 | static int cdc_config_register(struct usb_composite_dev *cdev) | 242 | static int cdc_config_register(struct usb_composite_dev *cdev) |
244 | { | 243 | { |
245 | static struct usb_configuration config = { | 244 | static struct usb_configuration config = { |
246 | .bind = cdc_do_config, | ||
247 | .bConfigurationValue = MULTI_CDC_CONFIG_NUM, | 245 | .bConfigurationValue = MULTI_CDC_CONFIG_NUM, |
248 | .bmAttributes = USB_CONFIG_ATT_SELFPOWER, | 246 | .bmAttributes = USB_CONFIG_ATT_SELFPOWER, |
249 | }; | 247 | }; |
@@ -251,7 +249,7 @@ static int cdc_config_register(struct usb_composite_dev *cdev) | |||
251 | config.label = strings_dev[MULTI_STRING_CDC_CONFIG_IDX].s; | 249 | config.label = strings_dev[MULTI_STRING_CDC_CONFIG_IDX].s; |
252 | config.iConfiguration = strings_dev[MULTI_STRING_CDC_CONFIG_IDX].id; | 250 | config.iConfiguration = strings_dev[MULTI_STRING_CDC_CONFIG_IDX].id; |
253 | 251 | ||
254 | return usb_add_config(cdev, &config); | 252 | return usb_add_config(cdev, &config, cdc_do_config); |
255 | } | 253 | } |
256 | 254 | ||
257 | #else | 255 | #else |