diff options
author | Yegor Yefremov <yegor_sub1@visionsystems.de> | 2010-09-30 14:14:22 +0200 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2011-01-06 18:08:11 -0500 |
commit | 388a1771e497f0b78c8993e0259316673d5bc840 (patch) | |
tree | cbd157e8d5b11b39007c8681b17cf9266612bbd4 /fs | |
parent | 825cdb6dcd0a001c57a7680ab6d2b8d7ebd8462d (diff) | |
download | lwn-388a1771e497f0b78c8993e0259316673d5bc840.tar.gz lwn-388a1771e497f0b78c8993e0259316673d5bc840.zip |
i2c-pca: Fix waitforcompletion() return value
commit 6abb930af064fb1cf4177d32e2c7bfb89eee0fe5 upstream.
ret is still -1, if during the polling read_byte() returns at once
with I2C_PCA_CON_SI set. So ret > 0 would lead *_waitforcompletion()
to return 0, in spite of the proper behavior.
The routine was rewritten, so that ret has always a proper value,
before returning.
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Reviewed-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'fs')
0 files changed, 0 insertions, 0 deletions