Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Tin Huynh and committed by
Jacek Anaszewski
aace34c0 2ea659a9

+1 -1
+1 -1
drivers/leds/leds-pca955x.c
··· 285 285 "slave address 0x%02x\n", 286 286 client->name, chip->bits, client->addr); 287 287 288 - if (!i2c_check_functionality(adapter, I2C_FUNC_I2C)) 288 + if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) 289 289 return -EIO; 290 290 291 291 if (pdata) {