summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/f_eem.c
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2012-12-23 21:10:12 +0100
committerFelipe Balbi <balbi@ti.com>2013-04-03 14:43:31 +0300
commitd6a0143985489e470a118605352f4b18df0ce142 (patch)
tree9fe2505807f5d5a721914dcb175542d4e342e414 /drivers/usb/gadget/f_eem.c
parent15761826eecda192f4d1527e08c32193a03e94b7 (diff)
usb: gadget: move the global the_dev variable to their users
the u_ether.c file has a global variable named the_dev which keeps a pointer to the network device after it has been created via gether_setup_name(). It is only used internally by u_ether. This patches moves the variable to its users and passes it via the port.ioport where it is saved later anyway. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/f_eem.c')
-rw-r--r--drivers/usb/gadget/f_eem.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/gadget/f_eem.c b/drivers/usb/gadget/f_eem.c
index cf0ebee85563..f4e0bbef602a 100644
--- a/drivers/usb/gadget/f_eem.c
+++ b/drivers/usb/gadget/f_eem.c
@@ -528,7 +528,7 @@ error:
* Caller must have called @gether_setup(). Caller is also responsible
* for calling @gether_cleanup() before module unload.
*/
-int __init eem_bind_config(struct usb_configuration *c)
+int __init eem_bind_config(struct usb_configuration *c, struct eth_dev *dev)
{
struct f_eem *eem;
int status;
@@ -549,6 +549,7 @@ int __init eem_bind_config(struct usb_configuration *c)
if (!eem)
return -ENOMEM;
+ eem->port.ioport = dev;
eem->port.cdc_filter = DEFAULT_FILTER;
eem->port.func.name = "cdc_eem";