All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] usb_ether: register usb ethernet gadget at each eth init
@ 2010-11-26  3:21 Lei Wen
  2010-11-26 18:23 ` Vitaly Kuzmichev
  0 siblings, 1 reply; 14+ messages in thread
From: Lei Wen @ 2010-11-26  3:21 UTC (permalink / raw)
  To: u-boot

Since the ether may not be the only one usb gadget would be used
in the uboot, it is neccessary to do the register each time the
eth begin to work to make usb gadget driver less confussed when
we want to use two different usb gadget at the same time.

Usb gadget driver could simple ignore the register operation, if
it find the driver has been registered already.

Signed-off-by: Lei Wen <leiwen@marvell.com>
---
 drivers/usb/gadget/ether.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
index 5a18e03..d57b2ad 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -1788,6 +1788,8 @@ static int usb_eth_init(struct eth_device *netdev, bd_t *bd)
 		error("received NULL ptr");
 		goto fail;
 	}
+	if (usb_gadget_register_driver(&eth_driver) < 0)
+		goto fail;
 
 	dev->network_started = 0;
 
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2010-12-09 18:53 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-26  3:21 [U-Boot] [PATCH] usb_ether: register usb ethernet gadget at each eth init Lei Wen
2010-11-26 18:23 ` Vitaly Kuzmichev
2010-11-27 14:21   ` Lei Wen
2010-11-29 13:56     ` Vitaly Kuzmichev
2010-11-29 14:06       ` Vitaly Kuzmichev
2010-11-30  2:04       ` Lei Wen
2010-11-30 15:13         ` Vitaly Kuzmichev
2010-11-30 15:55           ` Lei Wen
2010-11-30 16:41             ` Vitaly Kuzmichev
2010-12-01 15:32               ` Lei Wen
2010-12-01 15:43                 ` Lei Wen
2010-12-02 16:34                   ` Vitaly Kuzmichev
2010-12-03  2:35                     ` Lei Wen
2010-12-09 18:53                   ` Remy Bohmer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.