iio: light: jsa1212: remove unneeded i2c check functionality test
authorAlison Schofield <amsfield22@gmail.com>
Sun, 15 May 2016 18:37:27 +0000 (11:37 -0700)
committerJonathan Cameron <jic23@kernel.org>
Sat, 21 May 2016 19:18:05 +0000 (20:18 +0100)
This driver does not call i2c_smbus_read|write_byte_data(),
so remove the corresponding functionality test. It uses regmap
to handle byte transfers transparently.

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Reviewed-by:Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Reviewed-by: Matt Ranostay <matt.ranostay@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/light/jsa1212.c

index 99a62816c3b439559b5145c70dacf96585cb8c76..e8a8931b4f50d0a2c1db1959a05b6722b2621d25 100644 (file)
@@ -325,9 +325,6 @@ static int jsa1212_probe(struct i2c_client *client,
        struct regmap *regmap;
        int ret;
 
-       if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA))
-               return -EOPNOTSUPP;
-
        indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data));
        if (!indio_dev)
                return -ENOMEM;