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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux