]> git.baikalelectronics.ru Git - kernel.git/commit
i2c-powermac: Reject unsupported I2C transactions
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)
commite40425a719b25d54d1fa9b98f1b33dff41c1cd5a
tree7b8d37442fe3b6ebbaedda63deb65276a2371c9b
parent11992658a37a33d0a40fab59f1a2c694d0db1bba
i2c-powermac: Reject unsupported I2C transactions

The i2c-powermac driver doesn't support arbitrary multi-message I2C
transactions, only SMBus ones. Make it clear by returning an error if
a multi-message I2C transaction is attempted. This is better than only
processing the first message, because most callers won't recover from
the short transaction. Anyone wishing to issue multi-message
transactions should use the SMBus API instead of the raw I2C API.

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