diff options
author | Wolfram Sang <wsa@the-dreams.de> | 2015-01-07 12:24:10 +0100 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2015-03-13 15:10:57 +0100 |
commit | 7ee405ea068602d1fd42bf14ddc04d45733cfd7d (patch) | |
tree | 43fb9392da5a6a4ec4fa871fbba347a4927ff7ac /drivers/i2c | |
parent | afe90203977bc7ecd7d1048a5ad453a8670c16f5 (diff) | |
download | blackbird-op-linux-7ee405ea068602d1fd42bf14ddc04d45733cfd7d.tar.gz blackbird-op-linux-7ee405ea068602d1fd42bf14ddc04d45733cfd7d.zip |
i2c: powermac: make use of the new infrastructure for quirks
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-powermac.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/i2c/busses/i2c-powermac.c b/drivers/i2c/busses/i2c-powermac.c index 60a53c169ed2..6abcf696e359 100644 --- a/drivers/i2c/busses/i2c-powermac.c +++ b/drivers/i2c/busses/i2c-powermac.c @@ -153,12 +153,6 @@ static int i2c_powermac_master_xfer( struct i2c_adapter *adap, int read; int addrdir; - if (num != 1) { - dev_err(&adap->dev, - "Multi-message I2C transactions not supported\n"); - return -EOPNOTSUPP; - } - if (msgs->flags & I2C_M_TEN) return -EINVAL; read = (msgs->flags & I2C_M_RD) != 0; @@ -205,6 +199,9 @@ static const struct i2c_algorithm i2c_powermac_algorithm = { .functionality = i2c_powermac_func, }; +static struct i2c_adapter_quirks i2c_powermac_quirks = { + .max_num_msgs = 1, +}; static int i2c_powermac_remove(struct platform_device *dev) { @@ -434,6 +431,7 @@ static int i2c_powermac_probe(struct platform_device *dev) platform_set_drvdata(dev, adapter); adapter->algo = &i2c_powermac_algorithm; + adapter->quirks = &i2c_powermac_quirks; i2c_set_adapdata(adapter, bus); adapter->dev.parent = &dev->dev; |