From: NeilBrown <neil@brown.name>
To: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Tony Lindgren <tony@atomide.com>,
GTA04 owners <gta04-owner@goldelico.com>,
linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org,
Pavel Machek <pavel@ucw.cz>
Subject: [PATCH 2/6] phy: twl4030-usb: remove pointless 'suspended' test in 'suspend' callback.
Date: Thu, 16 Apr 2015 18:03:04 +1000 [thread overview]
Message-ID: <20150416080304.23307.25251.stgit@notabene.brown> (raw)
In-Reply-To: <20150416075945.23307.24424.stgit@notabene.brown>
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>
---
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 3078f80bf520..590c2b1c1a94 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)
next prev parent reply other threads:[~2015-04-16 8:05 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-16 8:03 [PATCH 0/6] Enhancements to twl4030 phy to support better charging NeilBrown
2015-04-16 8:03 ` [PATCH 1/6] phy: twl4030-usb: make runtime pm more reliable NeilBrown
2015-04-16 8:03 ` NeilBrown [this message]
2015-04-16 8:03 ` [PATCH 4/6] phy: twl4030-usb: add ABI documentation NeilBrown
2015-04-17 22:14 ` Pavel Machek
2015-04-17 22:34 ` NeilBrown
2015-04-16 8:03 ` [PATCH 6/6] phy: twl4030-usb: add extcon to report cable connections NeilBrown
2015-05-11 13:38 ` Kishon Vijay Abraham I
2015-05-11 15:58 ` Chanwoo Choi
2015-04-16 8:03 ` [PATCH 3/6] phy: twl4030-usb: remove incorrect pm_runtime_get_sync() in probe function NeilBrown
2015-04-16 8:03 ` [PATCH 5/6] phy: twl4030-usb: add support for reading resistor on ID pin NeilBrown
2015-06-01 13:36 ` Kishon Vijay Abraham I
2015-06-01 21:37 ` NeilBrown
2015-06-02 13:49 ` Kishon Vijay Abraham I
2015-06-02 14:06 ` [Gta04-owner] " Dr. H. Nikolaus Schaller
2015-06-02 20:11 ` Pavel Machek
2015-06-02 20:47 ` Dr. H. Nikolaus Schaller
2015-06-06 13:10 ` Pavel Machek
2015-06-08 3:45 ` Felipe Balbi
2015-06-23 9:09 ` [Gta04-owner] " Dr. H. Nikolaus Schaller
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=20150416080304.23307.25251.stgit@notabene.brown \
--to=neil@brown.name \
--cc=gta04-owner@goldelico.com \
--cc=kishon@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=tony@atomide.com \
/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;
as well as URLs for NNTP newsgroup(s).