From patchwork Tue Apr 19 08:19:53 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarkko Nikula X-Patchwork-Id: 717121 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p3J8Hwg9019559 for ; Tue, 19 Apr 2011 08:17:58 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753513Ab1DSIR5 (ORCPT ); Tue, 19 Apr 2011 04:17:57 -0400 Received: from mail-ey0-f174.google.com ([209.85.215.174]:64623 "EHLO mail-ey0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753172Ab1DSIR4 (ORCPT ); Tue, 19 Apr 2011 04:17:56 -0400 Received: by mail-ey0-f174.google.com with SMTP id 24so1619314eyx.19 for ; Tue, 19 Apr 2011 01:17:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer; bh=45lWuQ4fTOOn3NLHeE2w3Xdi9qNT9/fkp258PPBM84E=; b=Yu0uiCFKjW4daX9DAoHpFqTR5LJyheThxXe1vF9ZEYnvjX9+lzLEUSL5HWThqWHZWH h8GgwMfnstIHAE6h6PCDeYv4DuVqShaEsT6hMP5rJOcrJ/ZwaXlsjX+NLJCIyBtf9eA4 QXadI5FG8C5scoIF0S5N+EU3UWsyilvWn+mtg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=qoADlOp1FEYRfIZ/UAe3PirRQVQS2KBkFJC4d2Iw7z6KNk9c9lCRTFHri0IuEiTde3 elmWLT1neMtEhcC+ahWdtXUJfFTXqDA+gLUIoUSsQ/4KP4bTSX7S+bQqnSL2X2YJxgA8 pp7j5028jMW2vchJ81tjWIOaWf4/NN/b08B00= Received: by 10.14.123.143 with SMTP id v15mr2013182eeh.218.1303201075266; Tue, 19 Apr 2011 01:17:55 -0700 (PDT) Received: from localhost ([194.136.136.46]) by mx.google.com with ESMTPS id q53sm4640435eeh.4.2011.04.19.01.17.54 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 19 Apr 2011 01:17:54 -0700 (PDT) From: Jarkko Nikula To: linux-omap@vger.kernel.org Cc: Felipe Balbi , Tony Lindgren , Jarkko Nikula Subject: [PATCH] cbus: tahvo: Remove dead code from tahvo-usb.c Date: Tue, 19 Apr 2011 11:19:53 +0300 Message-Id: <1303201193-11516-1-git-send-email-jhnikula@gmail.com> X-Mailer: git-send-email 1.7.4.1 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 19 Apr 2011 08:17:58 +0000 (UTC) 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 --- 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;