From: Peter Meerwald Date: Sun, 23 Jun 2013 21:28:00 +0000 (+0100) Subject: iio: use I2C_FUNC_SMBUS_I2C_BLOCK macro X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=2ffdcd3dec720c6213b52f3fd8f5681e2d015cdf;p=openwrt%2Fstaging%2Fblogic.git iio: use I2C_FUNC_SMBUS_I2C_BLOCK macro I do not see why the driver requires I2C_FUNC_SMBUS_I2C_BLOCK, actually only single bytes or words are transferred Signed-off-by: Peter Meerwald Cc: Ge Gao Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c index fe4c61e219f3..6a1ff803862c 100644 --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c @@ -663,8 +663,8 @@ static int inv_mpu_probe(struct i2c_client *client, int result; if (!i2c_check_functionality(client->adapter, - I2C_FUNC_SMBUS_READ_I2C_BLOCK | - I2C_FUNC_SMBUS_WRITE_I2C_BLOCK)) { + I2C_FUNC_SMBUS_I2C_BLOCK)) { + result = -ENOSYS; goto out_no_free; }