Skip to contentSkip to conversation

mt9v032: Remove duplicate test for I2C_FUNC_SMBUS_WORD_DATA functionality

PATCH In review Axel Lin 2 participants 2 messages Aug 10, 2014 – Nov 9, 2015

Subsystems (3)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 mt9v032: Remove duplicate test for I2C_FUNC_SMBUS_WORD_DATA functionality

Since commit b42261078a91 ("regmap: i2c: fallback to SMBus if the adapter does not support standard I2C"), regmap-i2c will check the I2C_FUNC_SMBUS_[BYTE|WORD]_DATA functionality based on the regmap_config setting if the adapter does not support standard I2C.

So remove the I2C_FUNC_SMBUS_WORD_DATA functionality check in the driver code.

---
 drivers/media/i2c/mt9v032.c | 7 -------
 1 file changed, 7 deletions(-)
drivers/media/i2c/mt9v032.c +0 -7
index d044bce..f9e4bf7 100644
@@ -879,13 +879,6 @@ static int mt9v032_probe(struct i2c_client *client,
 	unsigned int i;
 	int ret;
 
-	if (!i2c_check_functionality(client->adapter,
-				     I2C_FUNC_SMBUS_WORD_DATA)) {
-		dev_warn(&client->adapter->dev,
-			 "I2C-Adapter doesn't support I2C_FUNC_SMBUS_WORD\n");
-		return -EIO;
-	}
-
 	mt9v032 = devm_kzalloc(&client->dev, sizeof(*mt9v032), GFP_KERNEL);
 	if (!mt9v032)
 		return -ENOMEM;
Signature · 1 line
1.9.1
maintainer Reviewed-by on v1 1/1
#1 lore raw

Hi Axel,

Thank you for the patch.

Quoted 9 lines · On Sunday 10 August 2014 17:41:49 Axel Lin wrote:

Since commit b42261078a91 ("regmap: i2c: fallback to SMBus if the adapter does not support standard I2C"), regmap-i2c will check the I2C_FUNC_SMBUS_[BYTE|WORD]_DATA functionality based on the regmap_config setting if the adapter does not support standard I2C.

So remove the I2C_FUNC_SMBUS_WORD_DATA functionality check in the driver code.

and applied to my tree.

Quoted 22 lines
---
 drivers/media/i2c/mt9v032.c | 7 -------
 1 file changed, 7 deletions(-)
drivers/media/i2c/mt9v032.c +0 -7
index d044bce..f9e4bf7 100644
@@ -879,13 +879,6 @@ static int mt9v032_probe(struct i2c_client *client,
 	unsigned int i;
 	int ret;
 
-	if (!i2c_check_functionality(client->adapter,
-				     I2C_FUNC_SMBUS_WORD_DATA)) {
-		dev_warn(&client->adapter->dev,
-			 "I2C-Adapter doesn't support I2C_FUNC_SMBUS_WORD\n");
-		return -EIO;
-	}
-
 	mt9v032 = devm_kzalloc(&client->dev, sizeof(*mt9v032), GFP_KERNEL);
 	if (!mt9v032)
 		return -ENOMEM;
Signature · 3 lines
Regards,

Laurent Pinchart