[PATCH 2/2] usb: imx: Fix setting of dev->priv

Sascha Hauer s.hauer at pengutronix.de
Thu Mar 9 00:33:06 PST 2017


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 at 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




More information about the barebox mailing list