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.smir...@gmail.com> Reviewed-by: Andrzej Hajda <a.ha...@samsung.com> Cc: Andrzej Hajda <a.ha...@samsung.com> Cc: Laurent Pinchart <laurent.pinch...@ideasonboard.com> Cc: Tomi Valkeinen <tomi.valkei...@ti.com> Cc: Andrey Gusakov <andrey.gusa...@cogentembedded.com> Cc: Philipp Zabel <p.za...@pengutronix.de> Cc: Cory Tusar <cory.tu...@zii.aero> Cc: Chris Healy <cphe...@gmail.com> Cc: Lucas Stach <l.st...@pengutronix.de> Cc: dri-devel@lists.freedesktop.org Cc: linux-ker...@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 fe672f6bba73..7cc26e26f371 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -292,10 +292,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, @@ -339,7 +338,7 @@ static ssize_t tc_aux_transfer(struct drm_dp_aux *aux, if (size == 0) return 0; - ret = tc_aux_wait_busy(tc, 100); + ret = tc_aux_wait_busy(tc); if (ret) return ret; @@ -367,7 +366,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