[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0ec0fd5e-8fbe-43c4-8aad-f36d2872f280@baylibre.com>
Date: Wed, 11 Jun 2025 08:57:30 -0500
From: David Lechner <dlechner@...libre.com>
To: "Jiri Slaby (SUSE)" <jirislaby@...nel.org>, linux-kernel@...r.kernel.org
Cc: tglx@...utronix.de, Jonathan Cameron <jic23@...nel.org>,
Nuno Sá <nuno.sa@...log.com>,
Andy Shevchenko <andy@...nel.org>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>, linux-iio@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] iio: Use dev_fwnode()
Subject should be "iio: adc: stm32-adc: Use dev_fwnode()"
On 6/11/25 5:43 AM, Jiri Slaby (SUSE) wrote:
> irq_domain_create_simple() takes fwnode as the first argument. It can be
> extracted from the struct device using dev_fwnode() helper instead of
> using of_node with of_fwnode_handle().
>
> So use the dev_fwnode() helper.
>
...
> @@ -421,10 +420,8 @@ static int stm32_adc_irq_probe(struct platform_device *pdev,
> return priv->irq[i];
> }
>
> - priv->domain = irq_domain_create_simple(of_fwnode_handle(np),
> - STM32_ADC_MAX_ADCS, 0,
> - &stm32_adc_domain_ops,
> - priv);
> + priv->domain = irq_domain_create_simple(dev_fwnode(&pdev->dev), STM32_ADC_MAX_ADCS, 0,
> + &stm32_adc_domain_ops, priv);
In the IIO subsystem, we still usually wrap at 80 characters so
wouldn't want to unwrap the lines here.
> if (!priv->domain) {
> dev_err(&pdev->dev, "Failed to add irq domain\n");
> return -ENOMEM;
Powered by blists - more mailing lists