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

Andy Shevchenko <[email protected]>
Newsgroups org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-gpio,org.kernel.vger.linux-kernel
Organization Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.