[PATCH] iio: Use dev_fwnode()

David Lechner dlechner at baylibre.com
Wed Jun 11 06:57:30 PDT 2025


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;




More information about the linux-arm-kernel mailing list