summaryrefslogtreecommitdiff
path: root/drivers/iio/dac/max517.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2024-09-03 01:16:55 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2024-09-30 11:21:00 +0300
commit3b6105e52bad737125e90d7d2975c8b56060e497 (patch)
tree7c0b8b09d9bf9dc5474231ffbc8c0cabd2da406b /drivers/iio/dac/max517.c
parent62ba49346add5b2319eeca5fe9ab1606fa70d6e6 (diff)
downloadlinux-3b6105e52bad737125e90d7d2975c8b56060e497.tar.xz
iio: dac: max517: Get platform data via dev_get_platdata()
Access to platform data via dev_get_platdata() getter to make code cleaner. Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://patch.msgid.link/20240902222824.1145571-11-andy.shevchenko@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/dac/max517.c')
-rw-r--r--drivers/iio/dac/max517.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/dac/max517.c b/drivers/iio/dac/max517.c
index 685980184d3c..84336736a47b 100644
--- a/drivers/iio/dac/max517.c
+++ b/drivers/iio/dac/max517.c
@@ -143,10 +143,10 @@ static const struct iio_chan_spec max517_channels[] = {
static int max517_probe(struct i2c_client *client)
{
+ const struct max517_platform_data *platform_data = dev_get_platdata(&client->dev);
const struct i2c_device_id *id = i2c_client_get_device_id(client);
struct max517_data *data;
struct iio_dev *indio_dev;
- struct max517_platform_data *platform_data = client->dev.platform_data;
int chan;
indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data));