[PATCH] usb: udc: pxa: remove unused platform_data

Andy Shevchenko andriy.shevchenko at linux.intel.com
Mon Apr 27 08:42:25 PDT 2026


On Mon, Apr 27, 2026 at 04:32:10PM +0200, Arnd Bergmann wrote:

> None of the remaining boards put useful data into the platform_data
> structures, so effectively this only works with DT based probing.
> 
> Remove all code that references this data, to stop using the legacy
> gpiolib interfaces. The pxa27x version already supports gpio
> descriptors, while the pxa25x version now does it the same way.

...

> +	dev->pullup_gpio = devm_gpiod_get_index_optional(&pdev->dev, "pullup", 0,
> +						    GPIOD_OUT_HIGH);

While I gave a tag some time ago, I still wonder why we use _index variant here.
With

	struct device *dev = &pdev->dev;

it becomes just a single line (yes, 82 characters long).

	dev->pullup_gpio = devm_gpiod_get_optional(dev, "pullup", GPIOD_OUT_HIGH);

> +	if (IS_ERR(dev->pullup_gpio)) {
> +		dev_dbg(&pdev->dev,
> +			"can't get pullup gpio err: %ld\n",
> +			PTR_ERR(dev->pullup_gpio));

This occupies more LOC than needed (also gpio --> GPIO).

		dev_dbg(dev, "can't get pullup GPIO err: %ld\n",
			PTR_ERR(dev->pullup_gpio));

I even wouldn't mind this to be long single line

		dev_dbg(dev, "can't get pullup GPIO: %ld\n", PTR_ERR(dev->pullup_gpio));

(I dropped ' err' part in this variant, though).

> +		retval = PTR_ERR(dev->pullup_gpio);
> +		goto err;
>  	}

-- 
With Best Regards,
Andy Shevchenko





More information about the linux-arm-kernel mailing list