Skip to contentSkip to conversation

iio: light: jsa1212: remove unneeded i2c check functionality test

PATCH Applied Alison Schofield 4 participants 4 messages May 15, 2016 – May 21, 2016 IIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iio: light: jsa1212: remove unneeded i2c check functionality test

This driver does not call i2c_smbus_read|write_byte_data(), so remove the corresponding functionality test. It uses regmap to handle byte transfers transparently.

---
Found & fixed by inspection based on same defect recently fixed in light/tpl0102 driver.

 drivers/iio/light/jsa1212.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/iio/light/jsa1212.c +0 -3
index 99a6281..e8a8931 100644
@@ -325,9 +325,6 @@ static int jsa1212_probe(struct i2c_client *client,
 	struct regmap *regmap;
 	int ret;
 
-	if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA))
-		return -EOPNOTSUPP;
-
 	indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data));
 	if (!indio_dev)
 		return -ENOMEM;
Signature · 1 line
2.1.4
Reviewed-by on v1 1/1
#1 lore raw

Looks Good.

Quoted 27 lines · Alison Schofield

This driver does not call i2c_smbus_read|write_byte_data(), so remove the corresponding functionality test. It uses regmap to handle byte transfers transparently.

---
Found & fixed by inspection based on same defect recently fixed in light/tpl0102 driver.

  drivers/iio/light/jsa1212.c | 3 ---
  1 file changed, 3 deletions(-)
drivers/iio/light/jsa1212.c +0 -3
index 99a6281..e8a8931 100644
@@ -325,9 +325,6 @@ static int jsa1212_probe(struct i2c_client *client,
  	struct regmap *regmap;
  	int ret;
 
-	if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA))
-		return -EOPNOTSUPP;
-
  	indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data));
  	if (!indio_dev)
  		return -ENOMEM;
Signature · 2 lines
Sathyanarayanan Kuppuswamy
Android kernel developer
Reviewed-by
#2 lore raw
Quoted 41 lines · sathyanarayanan kuppuswamy

Looks Good.

Reviewed-by:Kuppuswamy Sathyanarayanan
<[email protected]>

Quoted 19 lines · Alison Schofield

This driver does not call i2c_smbus_read|write_byte_data(), so remove the corresponding functionality test. It uses regmap to handle byte transfers transparently.

---
Found & fixed by inspection based on same defect recently fixed in light/tpl0102 driver.

  drivers/iio/light/jsa1212.c | 3 ---
  1 file changed, 3 deletions(-)
drivers/iio/light/jsa1212.c +0 -0
index 99a6281..e8a8931 100644

drivers/iio/light/jsa1212.c static int jsa1212_probe(struct i2c_client *client, · line 330

Quoted 9 lines
drivers/iio/light/jsa1212.c +0 -2
@@ -325,9 +325,6 @@ static int jsa1212_probe(struct i2c_client *client,
        struct regmap *regmap;
        int ret;
  -     if (!i2c_check_functionality(client->adapter,
 I2C_FUNC_SMBUS_BYTE_DATA))
-               return -EOPNOTSUPP;
-
        indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data));
        if (!indio_dev)
                return -ENOMEM;

--
Sathyanarayanan Kuppuswamy
Android kernel developer

maintainer Applied
#3 lore raw
Quoted 1 line · Matt Ranostay

Applied to the togreg branch of iio.git.

Thanks,

Jonathan

Quoted 44 lines
Quoted 41 lines · sathyanarayanan kuppuswamy

Looks Good.

Reviewed-by:Kuppuswamy Sathyanarayanan
<[email protected]>

Quoted 19 lines · Alison Schofield

This driver does not call i2c_smbus_read|write_byte_data(), so remove the corresponding functionality test. It uses regmap to handle byte transfers transparently.

---
Found & fixed by inspection based on same defect recently fixed in light/tpl0102 driver.

  drivers/iio/light/jsa1212.c | 3 ---
  1 file changed, 3 deletions(-)
drivers/iio/light/jsa1212.c +0 -0
index 99a6281..e8a8931 100644

drivers/iio/light/jsa1212.c static int jsa1212_probe(struct i2c_client *client, · line 330

Quoted 9 lines
drivers/iio/light/jsa1212.c +0 -2
@@ -325,9 +325,6 @@ static int jsa1212_probe(struct i2c_client *client,
        struct regmap *regmap;
        int ret;
  -     if (!i2c_check_functionality(client->adapter,
 I2C_FUNC_SMBUS_BYTE_DATA))
-               return -EOPNOTSUPP;
-
        indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data));
        if (!indio_dev)
                return -ENOMEM;

--
Sathyanarayanan Kuppuswamy
Android kernel developer