[U-Boot] [PATCH RFC V1 07/18] usb: gadget: mv_udc: set udc after controller.udc is initialized
Troy Kisky
troy.kisky at boundarydevices.com
Tue Jul 16 22:47:35 CEST 2013
mvudc_probe initializes controller.udc, so move initialization
of local udc variable after this call.
Signed-off-by: Troy Kisky <troy.kisky at boundarydevices.com>
---
drivers/usb/gadget/mv_udc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/mv_udc.c b/drivers/usb/gadget/mv_udc.c
index db30bdd..5ab4656 100644
--- a/drivers/usb/gadget/mv_udc.c
+++ b/drivers/usb/gadget/mv_udc.c
@@ -471,7 +471,6 @@ static int mvudc_probe(void)
int usb_gadget_register_driver(struct usb_gadget_driver *driver)
{
- struct mv_udc *udc = controller.udc;
int retval;
void *ctrl;
@@ -484,6 +483,8 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver)
}
if (!mvudc_probe()) {
+ struct mv_udc *udc = controller.udc;
+
usb_lowlevel_init(0, &ctrl);
/* select ULPI phy */
writel(PTS(PTS_ENABLE) | PFSC, &udc->portsc);
--
1.8.1.2
More information about the U-Boot
mailing list