aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-taos-evm.c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2008-07-14 16:38:25 -0400
committerJean Delvare <khali@mahadeva.delvare>2008-07-14 16:38:25 -0400
commitac7fc4fb2b6a126af8d07f46500440c9641976cf (patch)
tree1ba7a6b229699f6d69cfe3f1bd74c020e952e16b /drivers/i2c/busses/i2c-taos-evm.c
parentfa63cd56d2f09806169307d761e8f430e23bc09b (diff)
i2c: Consistently reject unsupported transactions
Many PC SMBus host controller drivers don't properly handle the case where they are requested to achieve a transaction they do not support. Update them so that the consistently print a warning message and return a single error value in this case. Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/i2c/busses/i2c-taos-evm.c')
-rw-r--r--drivers/i2c/busses/i2c-taos-evm.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-taos-evm.c b/drivers/i2c/busses/i2c-taos-evm.c
index de9db49e54d9..224aa12ee7c8 100644
--- a/drivers/i2c/busses/i2c-taos-evm.c
+++ b/drivers/i2c/busses/i2c-taos-evm.c
@@ -96,9 +96,8 @@ static int taos_smbus_xfer(struct i2c_adapter *adapter, u16 addr,
96 sprintf(p, "$%02X", command); 96 sprintf(p, "$%02X", command);
97 break; 97 break;
98 default: 98 default:
99 dev_dbg(&adapter->dev, "Unsupported transaction size %d\n", 99 dev_warn(&adapter->dev, "Unsupported transaction %d\n", size);
100 size); 100 return -EOPNOTSUPP;
101 return -EINVAL;
102 } 101 }
103 102
104 /* Send the transaction to the TAOS EVM */ 103 /* Send the transaction to the TAOS EVM */