summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPritesh Raithatha <praithatha@nvidia.com>2011-06-20 17:46:14 +0530
committerManish Tuteja <mtuteja@nvidia.com>2011-06-21 05:57:12 -0700
commit3da1897f8944b3e5273a6176f85f89d28c99612f (patch)
treee2fd45bf5dbd9e4cc108e727a1e32db18d5f7d6e
parent1f3fe5ab629261f81df97738d22c6a9ffc649d42 (diff)
video: tegra: hdcp: correct retry delay condition
This incorrect condition adds sleep to i2c read & write functions even though they are executed successfully. Bug 831891 Change-Id: If029b16c724516e96bf75458c60ca6b411ab5a96 Reviewed-on: http://git-master/r/37463 Reviewed-on: http://git-master/r/37472 Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com> Tested-by: Pritesh Raithatha <praithatha@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
-rw-r--r--drivers/video/tegra/dc/nvhdcp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/tegra/dc/nvhdcp.c b/drivers/video/tegra/dc/nvhdcp.c
index 49c5c9bea46e..8f134e953425 100644
--- a/drivers/video/tegra/dc/nvhdcp.c
+++ b/drivers/video/tegra/dc/nvhdcp.c
@@ -142,7 +142,7 @@ static int nvhdcp_i2c_read(struct tegra_nvhdcp *nvhdcp, u8 reg,
}
status = i2c_transfer(nvhdcp->client->adapter,
msg, ARRAY_SIZE(msg));
- if (retries > 1)
+ if ((status < 0) && (retries > 1))
msleep(250);
} while ((status < 0) && retries--);
@@ -179,7 +179,7 @@ static int nvhdcp_i2c_write(struct tegra_nvhdcp *nvhdcp, u8 reg,
}
status = i2c_transfer(nvhdcp->client->adapter,
msg, ARRAY_SIZE(msg));
- if (retries > 1)
+ if ((status < 0) && (retries > 1))
msleep(250);
} while ((status < 0) && retries--);