Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Andy Shevchenko and committed by
Jonathan Cameron
3b6105e5 62ba4934

+1 -1
+1 -1
drivers/iio/dac/max517.c
··· 143 143 144 144 static int max517_probe(struct i2c_client *client) 145 145 { 146 + const struct max517_platform_data *platform_data = dev_get_platdata(&client->dev); 146 147 const struct i2c_device_id *id = i2c_client_get_device_id(client); 147 148 struct max517_data *data; 148 149 struct iio_dev *indio_dev; 149 - struct max517_platform_data *platform_data = client->dev.platform_data; 150 150 int chan; 151 151 152 152 indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data));