summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTin Huynh <tnhuynh@apm.com>2017-05-22 16:19:20 +0700
committerJacek Anaszewski <jacek.anaszewski@gmail.com>2017-05-22 21:12:44 +0200
commitaace34c0bb8ea3c8bdcec865b6a4be4db0a68e33 (patch)
treefd0199eb315f41e62ac1c56f4e6f57e55f4041cd
parent2ea659a9ef488125eb46da6eb571de5eae5c43f6 (diff)
downloadlinux-aace34c0bb8ea3c8bdcec865b6a4be4db0a68e33.tar.gz
linux-aace34c0bb8ea3c8bdcec865b6a4be4db0a68e33.tar.bz2
linux-aace34c0bb8ea3c8bdcec865b6a4be4db0a68e33.zip
leds: pca955x: Correct I2C Functionality
The driver checks an incorrect flag of functionality of adapter. When a driver requires i2c_smbus_read_byte_data and i2c_smbus_write_byte_data, it should check I2C_FUNC_SMBUS_BYTE_DATA instead I2C_FUNC_I2C. This patch fixes the problem. Signed-off-by: Tin Huynh <tnhuynh@apm.com> Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
-rw-r--r--drivers/leds/leds-pca955x.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/leds/leds-pca955x.c b/drivers/leds/leds-pca955x.c
index 78a7ce816a47..9a873118ea5f 100644
--- a/drivers/leds/leds-pca955x.c
+++ b/drivers/leds/leds-pca955x.c
@@ -285,7 +285,7 @@ static int pca955x_probe(struct i2c_client *client,
"slave address 0x%02x\n",
client->name, chip->bits, client->addr);
- if (!i2c_check_functionality(adapter, I2C_FUNC_I2C))
+ if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA))
return -EIO;
if (pdata) {