From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Arnd Bergmann <arnd@arndb.de>, Daniel Mack <daniel@zonque.org>,
Haojian Zhuang <haojian.zhuang@gmail.com>,
Robert Jarzmik <robert.jarzmik@free.fr>,
Linus Walleij <linusw@kernel.org>,
Bartosz Golaszewski <brgl@kernel.org>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
linux-gpio@vger.kernel.org
Subject: Re: [PATCH] usb: udc: pxa: remove unused platform_data
Date: Mon, 27 Apr 2026 18:42:25 +0300 [thread overview]
Message-ID: <ae-D4Qki41GpOHyx@ashevche-desk.local> (raw)
In-Reply-To: <20260427143300.2887692-1-arnd@kernel.org>
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
next prev parent reply other threads:[~2026-04-27 15:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-27 14:32 [PATCH] usb: udc: pxa: remove unused platform_data Arnd Bergmann
2026-04-27 15:42 ` Andy Shevchenko [this message]
2026-04-27 15:43 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ae-D4Qki41GpOHyx@ashevche-desk.local \
--to=andriy.shevchenko@linux.intel.com \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=brgl@kernel.org \
--cc=daniel@zonque.org \
--cc=gregkh@linuxfoundation.org \
--cc=haojian.zhuang@gmail.com \
--cc=linusw@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=robert.jarzmik@free.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox