Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 24da3cc0 authored by Bartosz Golaszewski's avatar Bartosz Golaszewski Committed by Wolfram Sang
Browse files

eeprom: at24: tweak the loop_until_timeout() macro



loop_until_timeout() replaced a do {} while loop in the at24 driver
with a for loop which, under certain circumstances (such as heavy load
or low value of the write_timeout argument), can lead to the code in
the loop never being executed.

Make sure that at least one iteration of the code enclosed within
loop_until_timeout() is always executed.

Suggested-by: default avatarWolfram Sang <wsa@the-dreams.de>
Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent 0b813658
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment