at24: Use timeout also for read
authorWolfram Sang <w.sang@pengutronix.de>
Thu, 26 Nov 2009 08:22:33 +0000 (09:22 +0100)
committerJean Delvare <khali@linux-fr.org>
Thu, 26 Nov 2009 08:22:33 +0000 (09:22 +0100)
commit4d29196c535088e807061ce2a0aa526daec2edfb
tree960fbfa00bb0372a6be425b8131dd4d937e5d0d8
parentbbd2d9c9198c6efd449e9d395b3eaf2d03aa3bba
at24: Use timeout also for read

Writes may take some time on EEPROMs, so for consecutive writes, we already
have a loop waiting for the EEPROM to become ready. Use such a loop for reads,
too, in case somebody wants to immediately read after a write. Detailed bug
report and test case can be found here:

http://article.gmane.org/gmane.linux.drivers.i2c/4660

Reported-by: Aleksandar Ivanov <ivanov.aleks@gmail.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Tested-by: Aleksandar Ivanov <ivanov.aleks@gmail.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
drivers/misc/eeprom/at24.c