diff options
author | H Hartley Sweeten <hartleys@visionengravers.com> | 2010-04-13 22:01:31 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-11 11:35:36 -0700 |
commit | 59200df52cf7d4bfb93aeb30289a8e9d2af3058d (patch) | |
tree | 51dc27a47f50b3b6aed118d1799301f873d715aa /drivers/staging/crystalhd | |
parent | 09a3c4aeb108dcc2ee89370c511e263dbcc94563 (diff) |
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>
Diffstat (limited to 'drivers/staging/crystalhd')
0 files changed, 0 insertions, 0 deletions