i2c-powermac: Refactor i2c_powermac_smbus_xfer
authorJean Delvare <khali@linux-fr.org>
Sun, 6 Dec 2009 16:06:17 +0000 (17:06 +0100)
committerJean Delvare <khali@linux-fr.org>
Sun, 6 Dec 2009 16:06:17 +0000 (17:06 +0100)
commit02864d58ce102804b148c92e44726d9571d65d1e
treea2f94e0dfa1e07e2cbaeec55187afe46b1bef109
parent6f7e549f873e9ff10a4a27241db568bf7988ee0c
i2c-powermac: Refactor i2c_powermac_smbus_xfer

I wanted to add some error logging to the i2c-powermac driver, but
found that it was very difficult due to the way the
i2c_powermac_smbus_xfer function is organized. Refactor the code in
this function so that each low-level function is only called once.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Michel Daenzer <michel@daenzer.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
drivers/i2c/busses/i2c-powermac.c