Skip to content

Commit b892770

Browse files
andy-shevJonathan Cameron
authored andcommitted
iio: Drop Duplicated "mount-matrix" parameter
All of the users of iio_read_mount_matrix() are using the very same property name. Moreover, the property name is hard coded in the API documentation. Make this clear and avoid duplication now and in the future. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Sean Nyekjaer <sean@geanix.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20210518112546.44592-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
1 parent 941f130 commit b892770

20 files changed

Lines changed: 21 additions & 35 deletions

‎drivers/iio/accel/bma180.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,8 +1001,7 @@ static int bma180_probe(struct i2c_client *client,
10011001
chip = id->driver_data;
10021002
data->part_info = &bma180_part_info[chip];
10031003

1004-
ret = iio_read_mount_matrix(dev, "mount-matrix",
1005-
&data->orientation);
1004+
ret = iio_read_mount_matrix(dev, &data->orientation);
10061005
if (ret)
10071006
return ret;
10081007

‎drivers/iio/accel/bma400_core.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,7 @@ int bma400_probe(struct device *dev, struct regmap *regmap, const char *name)
811811
if (ret)
812812
return ret;
813813

814-
ret = iio_read_mount_matrix(dev, "mount-matrix", &data->orientation);
814+
ret = iio_read_mount_matrix(dev, &data->orientation);
815815
if (ret)
816816
return ret;
817817

‎drivers/iio/accel/bmc150-accel-core.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1685,8 +1685,7 @@ int bmc150_accel_core_probe(struct device *dev, struct regmap *regmap, int irq,
16851685
data->regmap = regmap;
16861686

16871687
if (!bmc150_apply_acpi_orientation(dev, &data->orientation)) {
1688-
ret = iio_read_mount_matrix(dev, "mount-matrix",
1689-
&data->orientation);
1688+
ret = iio_read_mount_matrix(dev, &data->orientation);
16901689
if (ret)
16911690
return ret;
16921691
}

‎drivers/iio/accel/fxls8962af-core.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,7 @@ int fxls8962af_core_probe(struct device *dev, struct regmap *regmap, int irq)
862862
dev_set_drvdata(dev, indio_dev);
863863
data->regmap = regmap;
864864

865-
ret = iio_read_mount_matrix(dev, "mount-matrix", &data->orientation);
865+
ret = iio_read_mount_matrix(dev, &data->orientation);
866866
if (ret)
867867
return ret;
868868

‎drivers/iio/accel/kxcjk-1013.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1455,8 +1455,7 @@ static int kxcjk1013_probe(struct i2c_client *client,
14551455
} else {
14561456
data->active_high_intr = true; /* default polarity */
14571457

1458-
ret = iio_read_mount_matrix(&client->dev, "mount-matrix",
1459-
&data->orientation);
1458+
ret = iio_read_mount_matrix(&client->dev, &data->orientation);
14601459
if (ret)
14611460
return ret;
14621461
}

‎drivers/iio/accel/kxsd9.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ int kxsd9_common_probe(struct device *dev,
420420
indio_dev->available_scan_masks = kxsd9_scan_masks;
421421

422422
/* Read the mounting matrix, if present */
423-
ret = iio_read_mount_matrix(dev, "mount-matrix", &st->orientation);
423+
ret = iio_read_mount_matrix(dev, &st->orientation);
424424
if (ret)
425425
return ret;
426426

‎drivers/iio/gyro/bmg160_core.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,8 +1106,7 @@ int bmg160_core_probe(struct device *dev, struct regmap *regmap, int irq,
11061106
if (ret)
11071107
return ret;
11081108

1109-
ret = iio_read_mount_matrix(dev, "mount-matrix",
1110-
&data->orientation);
1109+
ret = iio_read_mount_matrix(dev, &data->orientation);
11111110
if (ret)
11121111
return ret;
11131112

‎drivers/iio/gyro/itg3200_core.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,7 @@ static int itg3200_probe(struct i2c_client *client,
308308

309309
st = iio_priv(indio_dev);
310310

311-
ret = iio_read_mount_matrix(&client->dev, "mount-matrix",
312-
&st->orientation);
311+
ret = iio_read_mount_matrix(&client->dev, &st->orientation);
313312
if (ret)
314313
return ret;
315314

‎drivers/iio/gyro/mpu3050-core.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,7 @@ int mpu3050_common_probe(struct device *dev,
11641164
mpu3050->divisor = 99;
11651165

11661166
/* Read the mounting matrix, if present */
1167-
ret = iio_read_mount_matrix(dev, "mount-matrix", &mpu3050->orientation);
1167+
ret = iio_read_mount_matrix(dev, &mpu3050->orientation);
11681168
if (ret)
11691169
return ret;
11701170

‎drivers/iio/imu/bmi160/bmi160_core.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -852,8 +852,7 @@ int bmi160_core_probe(struct device *dev, struct regmap *regmap,
852852
return ret;
853853
}
854854

855-
ret = iio_read_mount_matrix(dev, "mount-matrix",
856-
&data->orientation);
855+
ret = iio_read_mount_matrix(dev, &data->orientation);
857856
if (ret)
858857
return ret;
859858

0 commit comments

Comments
 (0)