aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/common/st_sensors
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2020-03-13 12:49:49 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2020-03-21 10:26:10 +0000
commit49f20fc6fe7010e91f8d27847bea24bd990de953 (patch)
tree444b13b0b1b9af8ccab8122388268ce15deb4947 /drivers/iio/common/st_sensors
parentiio: light: st_uvis25: Drop unneeded casting when print error code (diff)
downloadlinux-dev-49f20fc6fe7010e91f8d27847bea24bd990de953.tar.xz
linux-dev-49f20fc6fe7010e91f8d27847bea24bd990de953.zip
iio: st_sensors: Use dev_get_platdata() to get platform_data
Use dev_get_platdata() to get the platform_data instead of referencing it directly. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/common/st_sensors')
-rw-r--r--drivers/iio/common/st_sensors/st_sensors_spi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/common/st_sensors/st_sensors_spi.c b/drivers/iio/common/st_sensors/st_sensors_spi.c
index 1275fb0eda31..dcbdef4a77f8 100644
--- a/drivers/iio/common/st_sensors/st_sensors_spi.c
+++ b/drivers/iio/common/st_sensors/st_sensors_spi.c
@@ -44,7 +44,7 @@ static bool st_sensors_is_spi_3_wire(struct spi_device *spi)
if (device_property_read_bool(dev, "spi-3wire"))
return true;
- pdata = (struct st_sensors_platform_data *)dev->platform_data;
+ pdata = dev_get_platdata(dev);
if (pdata && pdata->spi_3wire)
return true;