i2c: s3c2410: use 'time_left' variable with wait_event_timeout()
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Sat, 27 Apr 2024 20:36:06 +0000 (22:36 +0200)
committerAndi Shyti <andi.shyti@kernel.org>
Sun, 5 May 2024 22:56:54 +0000 (00:56 +0200)
commitbc0ff8022f26f8ee65dfea31fe590daf8adc8012
tree4e13cfa5f4af2da5bc1ec846ea749cbc1618d67a
parent749de720c7e568836e62c09508c92f00634c9bc3
i2c: s3c2410: use 'time_left' variable with wait_event_timeout()

There is a confusing pattern in the kernel to use a variable named 'timeout' to
store the result of wait_event_timeout() causing patterns like:

timeout = wait_event_timeout(...)
if (!timeout) return -ETIMEDOUT;

with all kinds of permutations. Use 'time_left' as a variable to make the code
self explaining.

Fix to the proper variable type 'long' while here.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
drivers/i2c/busses/i2c-s3c2410.c