diff options
author | Biju Das <biju.das.jz@bp.renesas.com> | 2023-09-03 10:00:51 +0100 |
---|---|---|
committer | Jonathan Cameron <jonathan.cameron@huawei.com> | 2023-09-12 10:42:04 +0100 |
commit | dcc3ac1381eff05e4ab546a42798dd6837b295a7 (patch) | |
tree | 5ae9f4cb9a7e770f0ae45f40b6ad99aeeb80e838 /drivers/iio/accel/adxl345_spi.c | |
parent | 7d0ba6dbf8356d20b69cfd042800d5d51ac00bd7 (diff) |
iio: accel: adxl345: Simplify adxl345_read_raw()
Simplify adxl345_read_raw() by adding uscale variable to
struct adxl345_chip_info. Also convert variables adxl3{4,7}5_uscale to
macros and use it in OF/ACPI/ID match table.
Drop enum adxl345_device_type as there is no user.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20230903090051.39274-3-biju.das.jz@bp.renesas.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/accel/adxl345_spi.c')
-rw-r--r-- | drivers/iio/accel/adxl345_spi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/accel/adxl345_spi.c b/drivers/iio/accel/adxl345_spi.c index ede9b9496158..93ca349f1780 100644 --- a/drivers/iio/accel/adxl345_spi.c +++ b/drivers/iio/accel/adxl345_spi.c @@ -38,12 +38,12 @@ static int adxl345_spi_probe(struct spi_device *spi) static const struct adxl345_chip_info adxl345_spi_info = { .name = "adxl345", - .type = ADXL345, + .uscale = ADXL345_USCALE, }; static const struct adxl345_chip_info adxl375_spi_info = { .name = "adxl375", - .type = ADXL375, + .uscale = ADXL375_USCALE, }; static const struct spi_device_id adxl345_spi_id[] = { |