From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 2/2] usb: imx: Fix setting of dev->priv
Date: Thu, 9 Mar 2017 09:33:06 +0100 [thread overview]
Message-ID: <20170309083306.21101-2-s.hauer@pengutronix.de> (raw)
In-Reply-To: <20170309083306.21101-1-s.hauer@pengutronix.de>
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
prev parent reply other threads:[~2017-03-09 8:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-09 8:33 [PATCH 1/2] usb: imx: role_registered contains role Sascha Hauer
2017-03-09 8:33 ` Sascha Hauer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170309083306.21101-2-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox