summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYaniv Gardi <ygardi@codeaurora.org>2015-10-12 11:41:59 +0300
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-22 11:01:27 -0700
commitc8d92a5e44c38ed96a105f93cbc500c89e97a47a (patch)
tree9c892a22a7fa0685ac52e334555334eddac6d048
parent3037e7b3805d486b18f811fe5c05662231b43883 (diff)
phy: phy-qcom-ufs: don't error out if some callbacks are not defined
Some callbacks may not be supported which is a valid case, and should not be considered as error. In such cases, and in order to reduce unnecessary logs, we better remove this error messages. Change-Id: I75b9e02a2189a330e0ca46387394be4a8c60ef5b Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org> Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
-rw-r--r--drivers/phy/phy-qcom-ufs.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/phy/phy-qcom-ufs.c b/drivers/phy/phy-qcom-ufs.c
index f8c4fd819d2c..a7d36f0fdcfe 100644
--- a/drivers/phy/phy-qcom-ufs.c
+++ b/drivers/phy/phy-qcom-ufs.c
@@ -568,14 +568,9 @@ int ufs_qcom_phy_set_tx_lane_enable(struct phy *generic_phy, u32 tx_lanes)
struct ufs_qcom_phy *ufs_qcom_phy = get_ufs_qcom_phy(generic_phy);
int ret = 0;
- if (!ufs_qcom_phy->phy_spec_ops->set_tx_lane_enable) {
- dev_err(ufs_qcom_phy->dev, "%s: set_tx_lane_enable() callback is not supported\n",
- __func__);
- ret = -ENOTSUPP;
- } else {
+ if (ufs_qcom_phy->phy_spec_ops->set_tx_lane_enable)
ufs_qcom_phy->phy_spec_ops->set_tx_lane_enable(ufs_qcom_phy,
tx_lanes);
- }
return ret;
}
@@ -586,13 +581,8 @@ int ufs_qcom_phy_ctrl_rx_linecfg(struct phy *generic_phy, bool ctrl)
struct ufs_qcom_phy *ufs_qcom_phy = get_ufs_qcom_phy(generic_phy);
int ret = 0;
- if (!ufs_qcom_phy->phy_spec_ops->ctrl_rx_linecfg) {
- dev_err(ufs_qcom_phy->dev, "%s: ctrl_rx_linecfg() callback is not supported\n",
- __func__);
- ret = -ENOTSUPP;
- } else {
+ if (ufs_qcom_phy->phy_spec_ops->ctrl_rx_linecfg)
ufs_qcom_phy->phy_spec_ops->ctrl_rx_linecfg(ufs_qcom_phy, ctrl);
- }
return ret;
}