diff options
| author | Ujwal Patel <ujwalp@codeaurora.org> | 2013-03-06 16:06:32 -0800 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:15:08 -0700 |
| commit | 7ff5d6cfe89441bc7aa23f3e3a2bc79649fa5243 (patch) | |
| tree | 907bbf314f74673afd9df244c9b1d1fcc7eec82f | |
| parent | 0e4772d73332f8945adf25daf01d1bbd60c272ca (diff) | |
msm: mdss: hdmi: fix return code when modifying hpd state
HDMI Tx's hot-plug detect circuit is enabled and disabled through
sysfs. If the new value is same as the current one then return success
instead of returning an error.
Change-Id: Id3c75739d48290dedb9bbf5a39b81650eae03766
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_hdmi_tx.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/video/fbdev/msm/mdss_hdmi_tx.c b/drivers/video/fbdev/msm/mdss_hdmi_tx.c index 1d49c2481ce2..6eb28a02b840 100644 --- a/drivers/video/fbdev/msm/mdss_hdmi_tx.c +++ b/drivers/video/fbdev/msm/mdss_hdmi_tx.c @@ -378,8 +378,9 @@ static ssize_t hdmi_tx_sysfs_wta_hpd(struct device *dev, } else if (1 == hpd && !hdmi_ctrl->hpd_feature_on) { rc = hdmi_tx_sysfs_enable_hpd(hdmi_ctrl, true); } else { - rc = -EPERM; - ret = rc; + DEV_DBG("%s: hpd is already '%s'. return\n", __func__, + hdmi_ctrl->hpd_feature_on ? "enabled" : "disabled"); + return ret; } if (!rc) { @@ -387,8 +388,9 @@ static ssize_t hdmi_tx_sysfs_wta_hpd(struct device *dev, (~hdmi_ctrl->hpd_feature_on) & BIT(0); DEV_DBG("%s: '%d'\n", __func__, hdmi_ctrl->hpd_feature_on); } else { - DEV_DBG("%s: '%d' (unchanged)\n", __func__, - hdmi_ctrl->hpd_feature_on); + DEV_ERR("%s: failed to '%s' hpd. rc = %d\n", __func__, + hpd ? "enable" : "disable", rc); + ret = rc; } return ret; |
