iio: potentiometer: tpl0102: remove unneeded i2c check functionality test
PATCH 1/1 iio: potentiometer: tpl0102: remove unneeded i2c check functionality test
Actually I2C_FUNC_SMBUS_WORD_DATA isn't need for this device, and regmap handles all single byte reads transparently.
--- drivers/iio/potentiometer/tpl0102.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/iio/potentiometer/tpl0102.c +0 -4
@@ -116,10 +116,6 @@ static int tpl0102_probe(struct i2c_client *client,struct tpl0102_data *data;struct iio_dev *indio_dev; -if (!i2c_check_functionality (client->adapter, -I2C_FUNC_SMBUS_WORD_DATA )) -return -EOPNOTSUPP ; - indio_dev =devm_iio_device_alloc (dev,sizeof (*data));if (!indio_dev)return -ENOMEM ;
Signature · 1 line
2.7.4
Quoted 4 lines · Matt Ranostay
Actually
I2C_FUNC_SMBUS_WORD_DATAisn't need for this device, and regmap handles all single byte reads transparently.Signed-off-by Matt Ranostay <[email protected]>
Applied to the togreg branch of iio.git. If you need it quicker I'm happy to push this trivial patch as a fix but only if is preventing known hardware from working (i.e. we have users complaining)
thanks
Jonathan
Quoted 20 lines
--- drivers/iio/potentiometer/tpl0102.c | 4 ---- 1 file changed, 4 deletions(-)drivers/iio/potentiometer/tpl0102.c +0
-4@@ -116,10 +116,6 @@ static int tpl0102_probe(struct i2c_client *client,struct tpl0102_data *data;struct iio_dev *indio_dev; -if (!i2c_check_functionality (client->adapter, -I2C_FUNC_SMBUS_WORD_DATA )) -return -EOPNOTSUPP ; - indio_dev =devm_iio_device_alloc (dev,sizeof (*data));if (!indio_dev)return -ENOMEM ;
No isn't breaking any hardware that I know of.
Thanks,
Matt
Quoted 34 lines · Jonathan Cameron
Quoted 4 lines · Matt Ranostay
Actually
I2C_FUNC_SMBUS_WORD_DATAisn't need for this device, and regmap handles all single byte reads transparently.Signed-off-by Matt Ranostay <[email protected]>Applied to the togreg branch of iio.git. If you need it quicker I'm happy to push this trivial patch as a fix but only if is preventing known hardware from working (i.e. we have users complaining)
thanks
Jonathan
Quoted 20 lines
--- drivers/iio/potentiometer/tpl0102.c | 4 ---- 1 file changed, 4 deletions(-)drivers/iio/potentiometer/tpl0102.c +0
-4@@ -116,10 +116,6 @@ static int tpl0102_probe(struct i2c_client *client,struct tpl0102_data *data;struct iio_dev *indio_dev; -if (!i2c_check_functionality (client->adapter, -I2C_FUNC_SMBUS_WORD_DATA )) -return -EOPNOTSUPP ; - indio_dev =devm_iio_device_alloc (dev,sizeof (*data));if (!indio_dev)return -ENOMEM ;