[<prev] [next>] [day] [month] [year] [list]
Message-ID: <v7l2skqj65vbku3ebjsfndfj3atl6iqpodamios2do6q6kcagf@whmuir6fwede>
Date: Tue, 4 Mar 2025 10:41:09 +0100
From: Uwe Kleine-König <u.kleine-koenig@...libre.com>
To: Jonathan Cameron <jic23@...nel.org>
Cc: Andy Shevchenko <andy.shevchenko@...il.com>,
Cosmin Tanislav <cosmin.tanislav@...log.com>, Dumitru Ceclan <mitrutzceclan@...il.com>,
Guillaume Ranquet <granquet@...libre.com>, Lars-Peter Clausen <lars@...afoo.de>,
Michael Hennerich <Michael.Hennerich@...log.com>, Michael Walle <michael@...le.cc>, Nuno Sa <nuno.sa@...log.com>,
linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH v4 9/8] iio: adc: ad7124: Benefit of dev =
indio_dev->dev.parent in ad7124_parse_channel_config()
Since commit a6eaf02b8274 ("iio: adc: ad7124: Switch from of specific to
fwnode based property handling") the function
ad7124_parse_channel_config() has a parameter `dev` that holds
the value `indio_dev->dev.parent`. Make use of that to shorten two code
lines.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@...libre.com>
---
Hello,
this is a patch opportunity I noticed while backporting my original
series to an older kernel to please my customer.
I chose to sneak it into the series in the hope to not offend maintainer
tools :-)
Best regards
Uwe
drivers/iio/adc/ad7124.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/adc/ad7124.c b/drivers/iio/adc/ad7124.c
index 5ab0d3e48c43..53b274ca42ac 100644
--- a/drivers/iio/adc/ad7124.c
+++ b/drivers/iio/adc/ad7124.c
@@ -1061,12 +1061,12 @@ static int ad7124_parse_channel_config(struct iio_dev *indio_dev,
/* Add one for temperature */
st->num_channels = min(num_channels + 1, AD7124_MAX_CHANNELS);
- chan = devm_kcalloc(indio_dev->dev.parent, st->num_channels,
+ chan = devm_kcalloc(dev, st->num_channels,
sizeof(*chan), GFP_KERNEL);
if (!chan)
return -ENOMEM;
- channels = devm_kcalloc(indio_dev->dev.parent, st->num_channels, sizeof(*channels),
+ channels = devm_kcalloc(dev, st->num_channels, sizeof(*channels),
GFP_KERNEL);
if (!channels)
return -ENOMEM;
--
2.47.1
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists