Re: [PATCH v6 2/3] ARM: omap1: use platform_device_register_full() for GPIO devices on OMAP 16xx

Andy Shevchenko
2026-04-27T14:44:05Z

On Mon, Apr 27, 2026 at 12:46:33PM +0200, Bartosz Golaszewski wrote:
> Ahead of changes attaching GPIO controller's software nodes referenced
> from the Nokia 770 board files to their target devices, switch the
> method for registering the platform devices to the
> platform_device_register_full() variant. This is done to leverage the
> new swnode field of struct platform_device_info which automate the
> software node's registration and assignment.

...

> for (i = 0; i < ARRAY_SIZE(omap16xx_gpio_dev); i++) {
> - pdev = omap16xx_gpio_dev[i];
> + pdevinfo = omap16xx_gpio_dev[i];
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> + res = &pdevinfo->res[0];
> if (unlikely(!res)) {
> dev_err(&pdev->dev, "Invalid mem resource.\n");
> return -ENODEV;

> base = ioremap(res->start, resource_size(res));
> if (unlikely(!base)) {
> - dev_err(&pdev->dev, "ioremap failed.\n");
> + pr_err("ioremap failed.\n");
> return -ENOMEM;
> }

Isn't this a stray change? Or why then? And why the previous dev_err() is left untouched?

> __raw_writel(SYSCONFIG_WORD, base + OMAP1610_GPIO_SYSCONFIG);
> iounmap(base);
>
> - platform_device_register(omap16xx_gpio_dev[i]);
> + platform_device_register_full(omap16xx_gpio_dev[i]);
> }

--
With Best Regards,
Andy Shevchenko