summaryrefslogtreecommitdiffstats
path: root/drivers/iio/accel
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/accel
parent3c50dee99588301869cdab857e70dfbb1b9ba6f0 (diff)
downloadlinux-49f20fc6fe7010e91f8d27847bea24bd990de953.tar.bz2
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/accel')
-rw-r--r--drivers/iio/accel/st_accel_core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/iio/accel/st_accel_core.c b/drivers/iio/accel/st_accel_core.c
index 7320275c7e56..5f7bdb1f55d1 100644
--- a/drivers/iio/accel/st_accel_core.c
+++ b/drivers/iio/accel/st_accel_core.c
@@ -1170,8 +1170,7 @@ EXPORT_SYMBOL(st_accel_get_settings);
int st_accel_common_probe(struct iio_dev *indio_dev)
{
struct st_sensor_data *adata = iio_priv(indio_dev);
- struct st_sensors_platform_data *pdata =
- (struct st_sensors_platform_data *)adata->dev->platform_data;
+ struct st_sensors_platform_data *pdata = dev_get_platdata(adata->dev);
struct iio_chan_spec *channels;
size_t channels_size;
int err;