mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 00:20:32 +00:00
i2c: powermac: make use of the new infrastructure for quirks
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
This commit is contained in:
parent
afe9020397
commit
7ee405ea06
1 changed files with 4 additions and 6 deletions
|
@ -153,12 +153,6 @@ static int i2c_powermac_master_xfer( struct i2c_adapter *adap,
|
||||||
int read;
|
int read;
|
||||||
int addrdir;
|
int addrdir;
|
||||||
|
|
||||||
if (num != 1) {
|
|
||||||
dev_err(&adap->dev,
|
|
||||||
"Multi-message I2C transactions not supported\n");
|
|
||||||
return -EOPNOTSUPP;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (msgs->flags & I2C_M_TEN)
|
if (msgs->flags & I2C_M_TEN)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
read = (msgs->flags & I2C_M_RD) != 0;
|
read = (msgs->flags & I2C_M_RD) != 0;
|
||||||
|
@ -205,6 +199,9 @@ static const struct i2c_algorithm i2c_powermac_algorithm = {
|
||||||
.functionality = i2c_powermac_func,
|
.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)
|
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);
|
platform_set_drvdata(dev, adapter);
|
||||||
adapter->algo = &i2c_powermac_algorithm;
|
adapter->algo = &i2c_powermac_algorithm;
|
||||||
|
adapter->quirks = &i2c_powermac_quirks;
|
||||||
i2c_set_adapdata(adapter, bus);
|
i2c_set_adapdata(adapter, bus);
|
||||||
adapter->dev.parent = &dev->dev;
|
adapter->dev.parent = &dev->dev;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue