From: H Hartley Sweeten Date: Wed, 14 Apr 2010 03:01:31 +0000 (-0500) Subject: Staging: dt3155: fix wait_ibsyclr function X-Git-Tag: v2.6.35-rc1~441^2^2~513 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=59200df52cf7d4bfb93aeb30289a8e9d2af3058d;p=pandora-kernel.git Staging: dt3155: fix wait_ibsyclr function The wait_ibsyclr function is supposed to return the status of the I2C cycle. Currently it will always return FALSE because the IIC_CSR2 register is not re-read in order to update the cached register value. This results in the NEW_CYCLE bit still being 1. The current code actually works correctly only because the return value of {Read|Write}I2C is not checked in the driver. Fix wait_ibsyclr by actually reading the IIC_CSR2 register to get the updated status. While here, change the return type to be an actual errno instead of the private TRUE/FALSE define and remove the now obvious comments about the return value. Also, remove the local variable 'writestat' in WriteI2C and just return the result of wait_ibsyclr. Signed-off-by: H Hartley Sweeten Cc: Scott Smedley Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed