mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Felipe Balbi <balbi@ti.com>,
	chiau.ee.chew@intel.com, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] phy: don't return error from the stubs
Date: Wed,  2 Apr 2014 15:25:43 +0300	[thread overview]
Message-ID: <1396441543-11744-1-git-send-email-heikki.krogerus@linux.intel.com> (raw)

Returning 0 from the stubs for the functions that are used
for PHY controlling. The interface should not appear to be
failing with every operation when the framework is not
enabled.

This fixes an issue in dwc3 driver, where the driver fails
the moment first phy_*() call is made when the framework is
not enabled.

Reported-by: Chew, Chiau Ee <chiau.ee.chew@intel.com>
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
---
 include/linux/phy/phy.h | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h
index e2f5ca9..00d6949 100644
--- a/include/linux/phy/phy.h
+++ b/include/linux/phy/phy.h
@@ -174,22 +174,22 @@ void devm_of_phy_provider_unregister(struct device *dev,
 #else
 static inline int phy_pm_runtime_get(struct phy *phy)
 {
-	return -ENOSYS;
+	return 0;
 }
 
 static inline int phy_pm_runtime_get_sync(struct phy *phy)
 {
-	return -ENOSYS;
+	return 0;
 }
 
 static inline int phy_pm_runtime_put(struct phy *phy)
 {
-	return -ENOSYS;
+	return 0;
 }
 
 static inline int phy_pm_runtime_put_sync(struct phy *phy)
 {
-	return -ENOSYS;
+	return 0;
 }
 
 static inline void phy_pm_runtime_allow(struct phy *phy)
@@ -204,27 +204,27 @@ static inline void phy_pm_runtime_forbid(struct phy *phy)
 
 static inline int phy_init(struct phy *phy)
 {
-	return -ENOSYS;
+	return 0;
 }
 
 static inline int phy_exit(struct phy *phy)
 {
-	return -ENOSYS;
+	return 0;
 }
 
 static inline int phy_power_on(struct phy *phy)
 {
-	return -ENOSYS;
+	return 0;
 }
 
 static inline int phy_power_off(struct phy *phy)
 {
-	return -ENOSYS;
+	return 0;
 }
 
 static inline int phy_get_bus_width(struct phy *phy)
 {
-	return -ENOSYS;
+	return 0;
 }
 
 static inline void phy_set_bus_width(struct phy *phy, int bus_width)
-- 
1.9.1


             reply	other threads:[~2014-04-02 12:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-02 12:25 Heikki Krogerus [this message]
2014-04-02 14:15 ` Felipe Balbi

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=1396441543-11744-1-git-send-email-heikki.krogerus@linux.intel.com \
    --to=heikki.krogerus@linux.intel.com \
    --cc=balbi@ti.com \
    --cc=chiau.ee.chew@intel.com \
    --cc=kishon@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@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®