Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
- Loading branch information
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
51 changes: 51 additions & 0 deletions
51
patches/usb/0010-make-sure-we-register-unregister-the-NOP-xceiver-onl.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
From 56662092d7778d482d731c9aad3f0f73be36bbc2 Mon Sep 17 00:00:00 2001 | ||
From: Vladimir Pantelic <vladimir@lgf.net> | ||
Date: Fri, 15 Mar 2013 23:33:31 +0100 | ||
Subject: [PATCH 10/10] make sure we register/unregister the NOP xceiver only | ||
once | ||
|
||
Signed-off-by: Vladimir Pantelic <vladimir@lgf.net> | ||
--- | ||
drivers/usb/musb/musb_dsps.c | 12 +++++++++--- | ||
1 file changed, 9 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c | ||
index 85a4502..077c1e7 100644 | ||
--- a/drivers/usb/musb/musb_dsps.c | ||
+++ b/drivers/usb/musb/musb_dsps.c | ||
@@ -417,7 +417,9 @@ static int dsps_musb_init(struct musb *musb) | ||
|
||
#if 1 | ||
/* NOP driver needs change if supporting dual instance */ | ||
- usb_nop_xceiv_register(); | ||
+ if(!pdev->id) { | ||
+ usb_nop_xceiv_register(); | ||
+ } | ||
musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2); | ||
#else | ||
/* Get the NOP PHY */ | ||
@@ -462,7 +464,9 @@ static int dsps_musb_init(struct musb *musb) | ||
return 0; | ||
err0: | ||
usb_put_phy(musb->xceiv); | ||
- usb_nop_xceiv_unregister(); | ||
+ if(!pdev->id) { | ||
+ usb_nop_xceiv_unregister(); | ||
+ } | ||
return status; | ||
} | ||
|
||
@@ -479,7 +483,9 @@ static int dsps_musb_exit(struct musb *musb) | ||
|
||
/* NOP driver needs change if supporting dual instance */ | ||
usb_put_phy(musb->xceiv); | ||
- usb_nop_xceiv_unregister(); | ||
+ if(!pdev->id) { | ||
+ usb_nop_xceiv_unregister(); | ||
+ } | ||
|
||
return 0; | ||
} | ||
-- | ||
1.8.1.4 | ||
|