* [PATCH] cbus: tahvo: Remove dead code from tahvo-usb.c
@ 2011-04-19 8:19 Jarkko Nikula
2011-04-19 10:05 ` Felipe Balbi
0 siblings, 1 reply; 3+ messages in thread
From: Jarkko Nikula @ 2011-04-19 8:19 UTC (permalink / raw)
To: linux-omap; +Cc: Felipe Balbi, Tony Lindgren, Jarkko Nikula
Looks like this code was ever used. It was added by commit
fe3702054f6412aea04373ceb9d27a4a417ff3f0 "OMAP: Fix USB on Nokia 770"
that can be found from linux-omap history if needed.
Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
---
drivers/cbus/tahvo-usb.c | 48 +---------------------------------------------
1 files changed, 1 insertions(+), 47 deletions(-)
diff --git a/drivers/cbus/tahvo-usb.c b/drivers/cbus/tahvo-usb.c
index f6b3c1a..be0333f 100644
--- a/drivers/cbus/tahvo-usb.c
+++ b/drivers/cbus/tahvo-usb.c
@@ -236,47 +236,6 @@ static DEVICE_ATTR(vbus_state, 0444, vbus_state_show, NULL);
int vbus_active = 0;
-#if 0
-
-static int host_suspend(struct tahvo_usb *tu)
-{
- struct device *dev;
-
- if (!tu->otg.host)
- return -ENODEV;
-
- /* Currently ASSUMES only the OTG port matters;
- * other ports could be active...
- */
- dev = tu->otg.host->controller;
- return dev->driver->suspend(dev, PMSG_SUSPEND);
-}
-
-static int host_resume(struct tahvo_usb *tu)
-{
- struct device *dev;
-
- if (!tu->otg.host)
- return -ENODEV;
-
- dev = tu->otg.host->controller;
- return dev->driver->resume(dev);
-}
-
-#else
-
-static int host_suspend(struct tahvo_usb *tu)
-{
- return 0;
-}
-
-static int host_resume(struct tahvo_usb *tu)
-{
- return 0;
-}
-
-#endif
-
static void check_vbus_state(struct tahvo_usb *tu)
{
int reg, prev_state;
@@ -303,7 +262,6 @@ static void check_vbus_state(struct tahvo_usb *tu)
case OTG_STATE_A_IDLE:
/* Session is now valid assuming the USB hub is driving Vbus */
tu->otg.state = OTG_STATE_A_HOST;
- host_resume(tu);
break;
default:
break;
@@ -355,7 +313,6 @@ static void tahvo_usb_become_host(struct tahvo_usb *tu)
static void tahvo_usb_stop_host(struct tahvo_usb *tu)
{
- host_suspend(tu);
tu->otg.state = OTG_STATE_A_IDLE;
}
@@ -403,8 +360,6 @@ static void tahvo_usb_power_off(struct tahvo_usb *tu)
if (tu->otg.gadget)
usb_gadget_vbus_disconnect(tu->otg.gadget);
- host_suspend(tu);
-
/* Disable OTG and interrupts */
if (TAHVO_MODE(tu) == TAHVO_MODE_PERIPHERAL)
id = OTG_ID;
@@ -521,8 +476,7 @@ static int tahvo_usb_set_host(struct otg_transceiver *otg, struct usb_bus *host)
if (TAHVO_MODE(tu) == TAHVO_MODE_HOST) {
tu->otg.host = NULL;
tahvo_usb_become_host(tu);
- } else
- host_suspend(tu);
+ }
tu->otg.host = host;
--
1.7.4.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] cbus: tahvo: Remove dead code from tahvo-usb.c
2011-04-19 8:19 [PATCH] cbus: tahvo: Remove dead code from tahvo-usb.c Jarkko Nikula
@ 2011-04-19 10:05 ` Felipe Balbi
2011-04-20 16:12 ` Tony Lindgren
0 siblings, 1 reply; 3+ messages in thread
From: Felipe Balbi @ 2011-04-19 10:05 UTC (permalink / raw)
To: Jarkko Nikula; +Cc: linux-omap, Felipe Balbi, Tony Lindgren
On Tue, Apr 19, 2011 at 11:19:53AM +0300, Jarkko Nikula wrote:
> Looks like this code was ever used. It was added by commit
> fe3702054f6412aea04373ceb9d27a4a417ff3f0 "OMAP: Fix USB on Nokia 770"
> that can be found from linux-omap history if needed.
>
> Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
FWIW:
Reviewied-by: Felipe Balbi <balbi@ti.com>
--
balbi
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] cbus: tahvo: Remove dead code from tahvo-usb.c
2011-04-19 10:05 ` Felipe Balbi
@ 2011-04-20 16:12 ` Tony Lindgren
0 siblings, 0 replies; 3+ messages in thread
From: Tony Lindgren @ 2011-04-20 16:12 UTC (permalink / raw)
To: Felipe Balbi; +Cc: Jarkko Nikula, linux-omap
* Felipe Balbi <balbi@ti.com> [110419 03:02]:
> On Tue, Apr 19, 2011 at 11:19:53AM +0300, Jarkko Nikula wrote:
> > Looks like this code was ever used. It was added by commit
> > fe3702054f6412aea04373ceb9d27a4a417ff3f0 "OMAP: Fix USB on Nokia 770"
> > that can be found from linux-omap history if needed.
> >
> > Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
>
> FWIW:
>
> Reviewied-by: Felipe Balbi <balbi@ti.com>
Both applied to the cbus branch.
Tony
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-04-20 19:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-19 8:19 [PATCH] cbus: tahvo: Remove dead code from tahvo-usb.c Jarkko Nikula
2011-04-19 10:05 ` Felipe Balbi
2011-04-20 16:12 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox