aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-stub.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/busses/i2c-stub.c')
-rw-r--r--drivers/i2c/busses/i2c-stub.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-stub.c b/drivers/i2c/busses/i2c-stub.c
index d08eeec53913..1b7b2af94036 100644
--- a/drivers/i2c/busses/i2c-stub.c
+++ b/drivers/i2c/busses/i2c-stub.c
@@ -43,7 +43,7 @@ struct stub_chip {
43 43
44static struct stub_chip *stub_chips; 44static struct stub_chip *stub_chips;
45 45
46/* Return -1 on error. */ 46/* Return negative errno on error. */
47static s32 stub_xfer(struct i2c_adapter * adap, u16 addr, unsigned short flags, 47static s32 stub_xfer(struct i2c_adapter * adap, u16 addr, unsigned short flags,
48 char read_write, u8 command, int size, union i2c_smbus_data * data) 48 char read_write, u8 command, int size, union i2c_smbus_data * data)
49{ 49{
@@ -120,7 +120,7 @@ static s32 stub_xfer(struct i2c_adapter * adap, u16 addr, unsigned short flags,
120 120
121 default: 121 default:
122 dev_dbg(&adap->dev, "Unsupported I2C/SMBus command\n"); 122 dev_dbg(&adap->dev, "Unsupported I2C/SMBus command\n");
123 ret = -1; 123 ret = -EOPNOTSUPP;
124 break; 124 break;
125 } /* switch (size) */ 125 } /* switch (size) */
126 126
@@ -140,7 +140,7 @@ static const struct i2c_algorithm smbus_algorithm = {
140 140
141static struct i2c_adapter stub_adapter = { 141static struct i2c_adapter stub_adapter = {
142 .owner = THIS_MODULE, 142 .owner = THIS_MODULE,
143 .class = I2C_CLASS_HWMON, 143 .class = I2C_CLASS_HWMON | I2C_CLASS_SPD,
144 .algo = &smbus_algorithm, 144 .algo = &smbus_algorithm,
145 .name = "SMBus stub driver", 145 .name = "SMBus stub driver",
146}; 146};