diff mbox series

[25/34] thermal: qcom: qcom-spmi-adc-tm5: convert to IIO fwnode API

Message ID 20220610084545.547700-26-nuno.sa@analog.com (mailing list archive)
State Superseded
Headers show
Series make iio inkern interface firmware agnostic | expand

Commit Message

Nuno Sa June 10, 2022, 8:45 a.m. UTC
Make usage of the new firmware agnostic API
'devm_of_iio_channel_get_by_name()' to get the IIO channel.

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
---
 drivers/thermal/qcom/qcom-spmi-adc-tm5.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Andy Shevchenko June 10, 2022, 3:20 p.m. UTC | #1
On Fri, Jun 10, 2022 at 10:48 AM Nuno Sá <nuno.sa@analog.com> wrote:
>
> Make usage of the new firmware agnostic API
> 'devm_of_iio_channel_get_by_name()' to get the IIO channel.

_of_ ?!
Nuno Sá June 10, 2022, 7:42 p.m. UTC | #2
On Fri, 2022-06-10 at 17:20 +0200, Andy Shevchenko wrote:
> On Fri, Jun 10, 2022 at 10:48 AM Nuno Sá <nuno.sa@analog.com> wrote:
> > 
> > Make usage of the new firmware agnostic API
> > 'devm_of_iio_channel_get_by_name()' to get the IIO channel.
> 
> _of_ ?!
> 

Clearly not :)... Will fix it on v2

- Nuno Sá
diff mbox series

Patch

diff --git a/drivers/thermal/qcom/qcom-spmi-adc-tm5.c b/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
index d9c9c975f931..0b8543c627f0 100644
--- a/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
+++ b/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
@@ -825,7 +825,8 @@  static int adc_tm5_get_dt_channel_data(struct adc_tm5_chip *adc_tm,
 	}
 	channel->adc_channel = args.args[0];
 
-	channel->iio = devm_of_iio_channel_get_by_name(adc_tm->dev, node, NULL);
+	channel->iio = devm_fwnode_iio_channel_get_by_name(adc_tm->dev,
+							   of_fwnode_handle(node), NULL);
 	if (IS_ERR(channel->iio)) {
 		ret = PTR_ERR(channel->iio);
 		if (ret != -EPROBE_DEFER)