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

Andy Shevchenko andriy.shevchenko at linux.intel.com
Mon Apr 27 07:47:03 PDT 2026


On Mon, Apr 27, 2026 at 05:44:05PM +0300, Andy Shevchenko wrote:
> On Mon, Apr 27, 2026 at 12:46:33PM +0200, Bartosz Golaszewski wrote:

...

> >  	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?

If you go with pr_*(), please use ->name and ->id from pdevinfo to make it on par with the
previously called dev_err(). Perhaps even pr_fmt() on top of that (on top of the file).

> >  		__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





More information about the linux-arm-kernel mailing list