Skip to content

Commit

Permalink
drm/bridge: tc358767: Simplify tc_aux_wait_busy()
Browse files Browse the repository at this point in the history
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@gmail.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Andrzej Hajda <a.hajda@samsung.com>
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Cory Tusar <cory.tusar@zii.aero>
Cc: Chris Healy <cphealy@gmail.com>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190619052716.16831-13-andrew.smirnov@gmail.com
  • Loading branch information
Andrey Smirnov authored and Andrzej Hajda committed Jun 27, 2019
1 parent 134fb30 commit 7264892
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions drivers/gpu/drm/bridge/tc358767.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,10 +283,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,
Expand Down Expand Up @@ -330,7 +329,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;

Expand Down Expand Up @@ -358,7 +357,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;

Expand Down

0 comments on commit 7264892

Please sign in to comment.