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 <hsweeten@visionengravers.com>
Cc: Scott Smedley <ss@aao.gov.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>