]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
i2c-i801: Fix handling of error conditions
authorJean Delvare <khali@linux-fr.org>
Mon, 14 Jul 2008 20:38:33 +0000 (22:38 +0200)
committerJean Delvare <khali@mahadeva.delvare>
Mon, 14 Jul 2008 20:38:33 +0000 (22:38 +0200)
commitcf898dc5e9dfd1487b28ca0176b68722f05d4d48
tree9369f5cc37f1013058187d79b370541e7ad8dc3e
parent2b73809d06649fe6c7f4294b051ca4934a34bb91
i2c-i801: Fix handling of error conditions

Move the check of pre-transaction and post-transaction conditions to
separate functions, and adjust them a bit. Having dedicated functions
for that ensures that errors are handled in a consistent way.

Bit HOST_BUSY of the status register is read-only, so writing to it is
certainly not going to clear it. If this bit is set then we simply
don't want to start the transaction, as it means that somebody else
(ACPI, SMM?) is already using the controller.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
drivers/i2c/busses/i2c-i801.c