From: Yegor Yefremov Date: Thu, 30 Sep 2010 12:14:22 +0000 (+0200) Subject: i2c-pca: Fix waitforcompletion() return value X-Git-Tag: v2.6.36-rc8~33^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6abb930af064fb1cf4177d32e2c7bfb89eee0fe5;p=pandora-kernel.git i2c-pca: Fix waitforcompletion() return value 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 Reviewed-by: Wolfram Sang Cc: stable@kernel.org Signed-off-by: Jean Delvare --- Reading git-diff-tree failed