linux/drivers/staging/dt3155
H Hartley Sweeten 59200df52c 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>
2010-05-11 11:35:36 -07:00
..
allocator.c Staging: remove unused #include <linux/version.h> 2010-05-11 11:35:36 -07:00
allocator.h staging: dt3155: revert u_long to u64 usage 2010-03-03 16:43:07 -08:00
allocator.README Staging: add dt3155 driver 2010-03-03 16:42:31 -08:00
dt3155_drv.c staging: fix dt3155 build 2010-04-22 07:20:00 -07:00
dt3155_drv.h Staging: dt3155: replace u_int and u_long usage 2010-03-03 16:42:56 -08:00
dt3155_io.c Staging: dt3155: fix wait_ibsyclr function 2010-05-11 11:35:36 -07:00
dt3155_io.h staging: dt3155: revert u_long to u64 usage 2010-03-03 16:43:07 -08:00
dt3155_isr.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
dt3155_isr.h staging: dt3155: revert u_long to u64 usage 2010-03-03 16:43:07 -08:00
dt3155.h staging: dt3155: revert u_long to u64 usage 2010-03-03 16:43:07 -08:00
dt3155.sysvinit Staging: add dt3155 driver 2010-03-03 16:42:31 -08:00
Kconfig Staging: dt3155: add it to the build 2010-03-03 16:42:31 -08:00
Makefile Staging: dt3155: add it to the build 2010-03-03 16:42:31 -08:00
TODO Staging: dt3155: add TODO file 2010-03-03 16:42:31 -08:00