summaryrefslogtreecommitdiff
path: root/drivers/iio/accel/adxl345_spi.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2022-02-22 11:00:05 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2022-02-26 19:11:13 +0000
commit266be7cb11c75f930a5902bc6199ff50ca4282a1 (patch)
treebc4abdbe4cf19b8f00ccaed874e37faf7cc9c34f /drivers/iio/accel/adxl345_spi.c
parentc1db3d5cab03a79947736c44fd33f19f234b14a0 (diff)
iio: accel: adxl345: Make use of device properties
Convert the module to be property provider agnostic and allow it to be used on non-OF platforms. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Link: https://lore.kernel.org/r/20220222090009.2060-4-andriy.shevchenko@linux.intel.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.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/iio/accel/adxl345_spi.c b/drivers/iio/accel/adxl345_spi.c
index 34b7001d519f..ee4c50c8a95b 100644
--- a/drivers/iio/accel/adxl345_spi.c
+++ b/drivers/iio/accel/adxl345_spi.c
@@ -22,7 +22,6 @@ static const struct regmap_config adxl345_spi_regmap_config = {
static int adxl345_spi_probe(struct spi_device *spi)
{
- const struct spi_device_id *id = spi_get_device_id(spi);
struct regmap *regmap;
/* Bail out if max_speed_hz exceeds 5 MHz */
@@ -34,7 +33,7 @@ static int adxl345_spi_probe(struct spi_device *spi)
if (IS_ERR(regmap))
return dev_err_probe(&spi->dev, PTR_ERR(regmap), "Error initializing regmap\n");
- return adxl345_core_probe(&spi->dev, regmap, id->driver_data);
+ return adxl345_core_probe(&spi->dev, regmap);
}
static const struct spi_device_id adxl345_spi_id[] = {