* [PATCH 1/2] usb: imx: role_registered contains role
@ 2017-03-09 8:33 Sascha Hauer
2017-03-09 8:33 ` [PATCH 2/2] usb: imx: Fix setting of dev->priv Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Sascha Hauer @ 2017-03-09 8:33 UTC (permalink / raw)
To: Barebox List
role_registered contains the role, it's not a bool indicating that
a role is registered.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/usb/imx/chipidea-imx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/imx/chipidea-imx.c b/drivers/usb/imx/chipidea-imx.c
index ccd5346133..67d01d3de5 100644
--- a/drivers/usb/imx/chipidea-imx.c
+++ b/drivers/usb/imx/chipidea-imx.c
@@ -167,7 +167,7 @@ static int ci_register_role(struct imx_chipidea *ci)
if (ci->mode == IMX_USB_MODE_HOST) {
if (IS_ENABLED(CONFIG_USB_EHCI)) {
- ci->role_registered = 1;
+ ci->role_registered = IMX_USB_MODE_HOST;
ret = regulator_enable(ci->vbus);
if (ret)
return ret;
@@ -185,7 +185,7 @@ static int ci_register_role(struct imx_chipidea *ci)
if (ci->mode == IMX_USB_MODE_DEVICE) {
if (IS_ENABLED(CONFIG_USB_GADGET_DRIVER_ARC)) {
- ci->role_registered = 1;
+ ci->role_registered = IMX_USB_MODE_DEVICE;
return ci_udc_register(ci->dev, ci->base);
} else {
dev_err(ci->dev, "USB device support not available\n");
--
2.11.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 2/2] usb: imx: Fix setting of dev->priv
2017-03-09 8:33 [PATCH 1/2] usb: imx: role_registered contains role Sascha Hauer
@ 2017-03-09 8:33 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2017-03-09 8:33 UTC (permalink / raw)
To: Barebox List
Since fc10539f7d the usbmisc pointer must be stored in dev->priv,
but dev->priv has never been set. Fix this.
Fixes: fc10539f7d usb: imx: Make usb-misc multi instance safe
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/usb/imx/imx-usb-misc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/imx/imx-usb-misc.c b/drivers/usb/imx/imx-usb-misc.c
index dc0de9e9e1..ef3892c220 100644
--- a/drivers/usb/imx/imx-usb-misc.c
+++ b/drivers/usb/imx/imx-usb-misc.c
@@ -640,7 +640,7 @@ static int imx_usbmisc_probe(struct device_d *dev)
{
struct resource *iores;
struct imx_usb_misc_data *devtype;
- struct imx_usb_misc_priv *usbmisc = dev->priv;
+ struct imx_usb_misc_priv *usbmisc;
int ret;
ret = dev_get_drvdata(dev, (const void **)&devtype);
@@ -655,6 +655,8 @@ static int imx_usbmisc_probe(struct device_d *dev)
usbmisc->base = IOMEM(iores->start);
usbmisc->data = devtype;
+ dev->priv = usbmisc;
+
return 0;
}
--
2.11.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-09 8:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-09 8:33 [PATCH 1/2] usb: imx: role_registered contains role Sascha Hauer
2017-03-09 8:33 ` [PATCH 2/2] usb: imx: Fix setting of dev->priv Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox