mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kishon Vijay Abraham I <kishon@ti.com>
To: <gregkh@linuxfoundation.org>
Cc: <kishon@ti.com>, <linux-kernel@vger.kernel.org>
Subject: [PATCH 12/14] phy: twl4030-usb: remove pointless 'suspended' test in 'suspend' callback.
Date: Tue, 2 Jun 2015 20:13:43 +0530	[thread overview]
Message-ID: <1433256225-476-13-git-send-email-kishon@ti.com> (raw)
In-Reply-To: <1433256225-476-1-git-send-email-kishon@ti.com>

From: NeilBrown <neil@brown.name>

When the runtime_suspend callback is running, 'runtime_status'
is always RPM_SUSPENDING, so pm_runtime_suspended() will always
fail.
Similarly while the runtime_resume callback is running
'runtime_status' is RPM_RESUMING, so pm_runtime_active() will
always fail.

So remove these two pointless tests.

Signed-off-by: NeilBrown <neil@brown.name>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
 drivers/phy/phy-twl4030-usb.c |    4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/phy/phy-twl4030-usb.c b/drivers/phy/phy-twl4030-usb.c
index 3078f80..590c2b1 100644
--- a/drivers/phy/phy-twl4030-usb.c
+++ b/drivers/phy/phy-twl4030-usb.c
@@ -396,8 +396,6 @@ static int twl4030_usb_runtime_suspend(struct device *dev)
 	struct twl4030_usb *twl = dev_get_drvdata(dev);
 
 	dev_dbg(twl->dev, "%s\n", __func__);
-	if (pm_runtime_suspended(dev))
-		return 0;
 
 	__twl4030_phy_power(twl, 0);
 	regulator_disable(twl->usb1v5);
@@ -413,8 +411,6 @@ static int twl4030_usb_runtime_resume(struct device *dev)
 	int res;
 
 	dev_dbg(twl->dev, "%s\n", __func__);
-	if (pm_runtime_active(dev))
-		return 0;
 
 	res = regulator_enable(twl->usb3v1);
 	if (res)
-- 
1.7.9.5


  parent reply	other threads:[~2015-06-02 14:45 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-02 14:43 [GIT PULL] phy: for v4.2 merge window Kishon Vijay Abraham I
2015-06-02 14:43 ` [PATCH 01/14] phy: core: Add devm_of_phy_get_by_index to phy-core Kishon Vijay Abraham I
2015-06-02 14:43 ` [PATCH 02/14] usb: ehci-platform: Use devm_of_phy_get_by_index Kishon Vijay Abraham I
2015-06-02 14:43 ` [PATCH 03/14] usb: ohci-platform: " Kishon Vijay Abraham I
2015-06-02 14:43 ` [PATCH 04/14] phy: phy-core: allow specifying supply at port level Kishon Vijay Abraham I
2015-06-02 14:43 ` [PATCH 05/14] phy: miphy28lp: fix sparse warnings Kishon Vijay Abraham I
2015-06-02 14:43 ` [PATCH 06/14] phy: miphy365x: " Kishon Vijay Abraham I
2015-06-02 14:43 ` [PATCH 07/14] phy: core: Check requested PHY status in _of_phy_get() Kishon Vijay Abraham I
2015-06-02 14:43 ` [PATCH 08/14] phy: rcar-gen2: Add support for R-Car E2 Kishon Vijay Abraham I
2015-06-02 14:43 ` [PATCH 09/14] Documentation: devicetree: add Broadcom SATA PHY binding Kishon Vijay Abraham I
2015-06-02 14:43 ` [PATCH 10/14] phy: add Broadcom SATA3 PHY driver for Broadcom STB SoCs Kishon Vijay Abraham I
2015-06-02 14:43 ` [PATCH 11/14] phy: twl4030-usb: make runtime pm more reliable Kishon Vijay Abraham I
2015-06-02 14:43 ` Kishon Vijay Abraham I [this message]
2015-06-02 14:43 ` [PATCH 13/14] phy: twl4030-usb: remove incorrect pm_runtime_get_sync() in probe function Kishon Vijay Abraham I
2015-06-02 14:43 ` [PATCH 14/14] phy: twl4030-usb: add ABI documentation Kishon Vijay Abraham I
2015-06-03  5:14 ` [GIT PULL] phy: for v4.2 merge window Greg KH
2015-06-03  5:32   ` Kishon Vijay Abraham I

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=1433256225-476-13-git-send-email-kishon@ti.com \
    --to=kishon@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@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®