Skip to contentSkip to conversation

V4L/DVB: tea6415c: return -EIO if i2c_check_functionality fails

PATCH In review Axel Lin 2 participants 2 messages Nov 1, 2010 Media (V4L/DVB)

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 V4L/DVB: tea6415c: return -EIO if i2c_check_functionality fails

If the adapter does not support I2C_FUNC_SMBUS_WRITE_BYTE, return -EIO instead of 0.

---
 drivers/media/video/tea6415c.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/media/video/tea6415c.c +1 -1
index 3e99cea..19621ed 100644
@@ -148,7 +148,7 @@ static int tea6415c_probe(struct i2c_client *client,
 
 	/* let's see whether this adapter can support what we need */
 	if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_WRITE_BYTE))
-		return 0;
+		return -EIO;
 
 	v4l_info(client, "chip found @ 0x%x (%s)\n",
 			client->addr << 1, client->adapter->name);
Signature · 1 line
1.7.2
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · On Monday, November 01, 2010 10:25:39 Axel Lin wrote:

If the adapter does not support I2C_FUNC_SMBUS_WRITE_BYTE, return -EIO instead of 0.

Quoted 18 lines
---
 drivers/media/video/tea6415c.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/media/video/tea6415c.c +1 -1
index 3e99cea..19621ed 100644
@@ -148,7 +148,7 @@ static int tea6415c_probe(struct i2c_client *client,
 
 	/* let's see whether this adapter can support what we need */
 	if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_WRITE_BYTE))
-		return 0;
+		return -EIO;
 
 	v4l_info(client, "chip found @ 0x%x (%s)\n",
 			client->addr << 1, client->adapter->name);
Signature · 1 line
Hans Verkuil - video4linux developer - sponsored by Cisco