From: Apelete Seketeli <apelete@seketeli.net>
To: Felipe Balbi <balbi@ti.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org
Cc: Lars-Peter Clausen <lars@metafoo.de>, linux-kernel@vger.kernel.org
Subject: [PATCH] usb: musb: register nop transceiver driver for jz4740
Date: Sat, 5 Jul 2014 07:47:25 +0200 [thread overview]
Message-ID: <1404539245-9211-2-git-send-email-apelete@seketeli.net> (raw)
In-Reply-To: <1404539245-9211-1-git-send-email-apelete@seketeli.net>
Following the name change of the nop transceiver driver in commit
4525bee, make sure to register the transceiver driver before calling
usb_get_phy() to avoid issues related to accessing its data structure
while it was not registered.
Signed-off-by: Apelete Seketeli <apelete@seketeli.net>
---
drivers/usb/musb/jz4740.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/usb/musb/jz4740.c b/drivers/usb/musb/jz4740.c
index 5f30537..d118729 100644
--- a/drivers/usb/musb/jz4740.c
+++ b/drivers/usb/musb/jz4740.c
@@ -19,6 +19,7 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/platform_device.h>
+#include <linux/usb/usb_phy_generic.h>
#include "musb_core.h"
@@ -80,6 +81,7 @@ static struct musb_hdrc_platform_data jz4740_musb_platform_data = {
static int jz4740_musb_init(struct musb *musb)
{
+ usb_phy_generic_register();
musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2);
if (!musb->xceiv) {
pr_err("HS UDC: no transceiver configured\n");
@@ -182,6 +184,7 @@ static int jz4740_remove(struct platform_device *pdev)
struct jz4740_glue *glue = platform_get_drvdata(pdev);
platform_device_unregister(glue->musb);
+ usb_phy_generic_unregister(pdev);
clk_disable_unprepare(glue->clk);
return 0;
--
1.7.10.4
next prev parent reply other threads:[~2014-07-05 5:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-05 5:47 [PATCH] Register NOP tranciever driver in JZ4740 musb glue layer Apelete Seketeli
2014-07-05 5:47 ` Apelete Seketeli [this message]
2014-07-05 18:21 ` [PATCH] usb: musb: register nop transceiver driver for jz4740 Sergei Shtylyov
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=1404539245-9211-2-git-send-email-apelete@seketeli.net \
--to=apelete@seketeli.net \
--cc=balbi@ti.com \
--cc=gregkh@linuxfoundation.org \
--cc=lars@metafoo.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.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
all inboxes | Powered by JetHome®