[PATCH v5 13/15] drm/bridge: tc358767: Simplify tc_aux_wait_busy()

Andrey Smirnov andrew.smirnov at gmail.com
Wed Jun 12 08:32:50 UTC 2019


We never pass anything but 100 as timeout_ms to tc_aux_wait_busy(), so
we may as well hardcode that value and simplify function's signature.

Signed-off-by: Andrey Smirnov <andrew.smirnov at gmail.com>
Reviewed-by: Andrzej Hajda <a.hajda at samsung.com>
Cc: Andrzej Hajda <a.hajda at samsung.com>
Cc: Laurent Pinchart <Laurent.pinchart at ideasonboard.com>
Cc: Tomi Valkeinen <tomi.valkeinen at ti.com>
Cc: Andrey Gusakov <andrey.gusakov at cogentembedded.com>
Cc: Philipp Zabel <p.zabel at pengutronix.de>
Cc: Cory Tusar <cory.tusar at zii.aero>
Cc: Chris Healy <cphealy at gmail.com>
Cc: Lucas Stach <l.stach at pengutronix.de>
Cc: dri-devel at lists.freedesktop.org
Cc: linux-kernel at vger.kernel.org
---
 drivers/gpu/drm/bridge/tc358767.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c
index 28df53f7c349..01ca92a6d9c8 100644
--- a/drivers/gpu/drm/bridge/tc358767.c
+++ b/drivers/gpu/drm/bridge/tc358767.c
@@ -294,10 +294,9 @@ static inline int tc_poll_timeout(struct tc_data *tc, unsigned int addr,
 					sleep_us, timeout_us);
 }
 
-static int tc_aux_wait_busy(struct tc_data *tc, unsigned int timeout_ms)
+static int tc_aux_wait_busy(struct tc_data *tc)
 {
-	return tc_poll_timeout(tc, DP0_AUXSTATUS, AUX_BUSY, 0,
-			       1000, 1000 * timeout_ms);
+	return tc_poll_timeout(tc, DP0_AUXSTATUS, AUX_BUSY, 0, 1000, 100000);
 }
 
 static int tc_aux_write_data(struct tc_data *tc, const void *data,
@@ -350,7 +349,7 @@ static ssize_t tc_aux_transfer(struct drm_dp_aux *aux,
 	u32 auxstatus;
 	int ret;
 
-	ret = tc_aux_wait_busy(tc, 100);
+	ret = tc_aux_wait_busy(tc);
 	if (ret)
 		return ret;
 
@@ -377,7 +376,7 @@ static ssize_t tc_aux_transfer(struct drm_dp_aux *aux,
 	if (ret)
 		return ret;
 
-	ret = tc_aux_wait_busy(tc, 100);
+	ret = tc_aux_wait_busy(tc);
 	if (ret)
 		return ret;
 
-- 
2.21.0



More information about the dri-devel mailing list