[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240902222824.1145571-4-andy.shevchenko@gmail.com>
Date: Tue, 3 Sep 2024 01:16:48 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Jonathan Cameron <Jonathan.Cameron@...wei.com>,
David Lechner <dlechner@...libre.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Michael Hennerich <michael.hennerich@...log.com>,
Antoniu Miclaus <antoniu.miclaus@...log.com>,
Jinjie Ruan <ruanjinjie@...wei.com>,
Lorenzo Bianconi <lorenzo@...nel.org>,
Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
Basavaraj Natikar <Basavaraj.Natikar@....com>,
linux-input@...r.kernel.org,
linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Jiri Kosina <jikos@...nel.org>,
Jonathan Cameron <jic23@...nel.org>,
Lars-Peter Clausen <lars@...afoo.de>,
Michael Hennerich <Michael.Hennerich@...log.com>,
Andy Shevchenko <andy.shevchenko@...il.com>
Subject: [PATCH v1 03/22] iio: adc: ad7791: Get platform data via dev_get_platdata()
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Access to platform data via dev_get_platdata() getter to make code cleaner.
Signed-off-by: Andy Shevchenko <andy.shevchenko@...il.com>
---
drivers/iio/adc/ad7791.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/adc/ad7791.c b/drivers/iio/adc/ad7791.c
index 86effe8501b4..5d2ad3dd6caa 100644
--- a/drivers/iio/adc/ad7791.c
+++ b/drivers/iio/adc/ad7791.c
@@ -371,7 +371,7 @@ static const struct iio_info ad7791_no_filter_info = {
};
static int ad7791_setup(struct ad7791_state *st,
- struct ad7791_platform_data *pdata)
+ const struct ad7791_platform_data *pdata)
{
/* Set to poweron-reset default values */
st->mode = AD7791_MODE_BUFFER;
@@ -401,7 +401,7 @@ static void ad7791_reg_disable(void *reg)
static int ad7791_probe(struct spi_device *spi)
{
- struct ad7791_platform_data *pdata = spi->dev.platform_data;
+ const struct ad7791_platform_data *pdata = dev_get_platdata(&spi->dev);
struct iio_dev *indio_dev;
struct ad7791_state *st;
int ret;
--
2.46.0
Powered by blists - more mailing lists