[PATCH v1 2/4] gpio: shared: Replace open coded fwnode_is_gpiochip()

Andy Shevchenko andriy.shevchenko at linux.intel.com
Mon Aug 24 01:37:18 PDT 2026


On Mon, Aug 24, 2026 at 09:42:33AM +0200, Andy Shevchenko wrote:
> Since GPIOLIB provides a helper, no need to open code it, hence
> replace that piece by fwnode_is_gpiochip().

...

> -			np = args.np;

Ah, this one is important.
It seems that

                        struct device_node *np __free(device_node) = NULL;

needs to be replaced with

                        struct fwnode_handle *node __free(fwnode_handle) = NULL;

or something alike between the lines.

> -			if (!of_property_present(np, "gpio-controller"))
> +			fwnode = of_fwnode_handle(args.np);
> +			if (!fwnode_is_gpiochip(fwnode))
>  				continue;

-- 
With Best Regards,
Andy Shevchenko





More information about the linux-arm-kernel mailing list