From 7ff5d6cfe89441bc7aa23f3e3a2bc79649fa5243 Mon Sep 17 00:00:00 2001 From: Ujwal Patel Date: Wed, 6 Mar 2013 16:06:32 -0800 Subject: 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 --- drivers/video/fbdev/msm/mdss_hdmi_tx.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'drivers/video/fbdev') 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; -- cgit v1.2.3