Skip to contentSkip to conversation

leds: tlc591xx: Remove redundant I2C_FUNC_SMBUS_BYTE_DATA functionality check

PATCH In review Axel Lin 3 participants 3 messages Jul 26, 2015 – Jul 30, 2015 LED

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 leds: tlc591xx: Remove redundant I2C_FUNC_SMBUS_BYTE_DATA functionality check

This checking is done by regmap_get_i2c_bus() which is called in devm_regmap_init_i2c().

---
 drivers/leds/leds-tlc591xx.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/leds/leds-tlc591xx.c +0 -4
index de16c29..b806eca 100644
@@ -231,10 +231,6 @@ tlc591xx_probe(struct i2c_client *client,
 	if (!count || count > tlc591xx->max_leds)
 		return -EINVAL;
 
-	if (!i2c_check_functionality(client->adapter,
-				     I2C_FUNC_SMBUS_BYTE_DATA))
-		return -EIO;
-
 	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
 	if (!priv)
 		return -ENOMEM;
Signature · 1 line
2.1.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Axel Lin

This checking is done by regmap_get_i2c_bus() which is called in devm_regmap_init_i2c().

Thanks
Andrew

Quoted 24 lines
---
 drivers/leds/leds-tlc591xx.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/leds/leds-tlc591xx.c +0 -4
index de16c29..b806eca 100644
@@ -231,10 +231,6 @@ tlc591xx_probe(struct i2c_client *client,
 	if (!count || count > tlc591xx->max_leds)
 		return -EINVAL;
 
-	if (!i2c_check_functionality(client->adapter,
-				     I2C_FUNC_SMBUS_BYTE_DATA))
-		return -EIO;
-
 	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
 	if (!priv)
 		return -ENOMEM;
Signature · 1 line
2.1.0