summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2017-03-09 09:30:46 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2017-03-09 09:31:57 +0100
commit400988a8315b147c5a3d03c9e3578c847b3fd225 (patch)
tree121adf0d7a0608403dc79301d4ca872a97677d7c
parentd6ef702f4f0d88e9aaa06884ef4c77fb7a42f55d (diff)
downloadbarebox-400988a8315b147c5a3d03c9e3578c847b3fd225.tar.gz
usb: imx: Fix setting of dev->priv
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>
-rw-r--r--drivers/usb/imx/imx-usb-misc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/imx/imx-usb-misc.c b/drivers/usb/imx/imx-usb-misc.c
index dc0de9e..ef3892c 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;
}