[PATCH 1/4] usb: phy: generic: Always use dev in usb_phy_generic_probe()

From: Geert Uytterhoeven

Date: Wed Jan 21 2026 - 09:38:44 EST


usb_phy_generic_probe() already has a "dev" variable that serves as a
shorthand for "&pdev->dev". Use it where appropriate, to shorten the
code.

Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
---
drivers/usb/phy/phy-generic.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c
index 8423be59ec0ffbe8..13bd16668932dc90 100644
--- a/drivers/usb/phy/phy-generic.c
+++ b/drivers/usb/phy/phy-generic.c
@@ -294,13 +294,13 @@ static int usb_phy_generic_probe(struct platform_device *pdev)
if (err)
return err;
if (nop->gpiod_vbus) {
- err = devm_request_threaded_irq(&pdev->dev,
+ err = devm_request_threaded_irq(dev,
gpiod_to_irq(nop->gpiod_vbus),
NULL, nop_gpio_vbus_thread,
VBUS_IRQ_FLAGS, "vbus_detect",
nop);
if (err) {
- dev_err(&pdev->dev, "can't request irq %i, err: %d\n",
+ dev_err(dev, "can't request irq %i, err: %d\n",
gpiod_to_irq(nop->gpiod_vbus), err);
return err;
}
@@ -313,14 +313,13 @@ static int usb_phy_generic_probe(struct platform_device *pdev)

err = usb_add_phy_dev(&nop->phy);
if (err) {
- dev_err(&pdev->dev, "can't register transceiver, err: %d\n",
- err);
+ dev_err(dev, "can't register transceiver, err: %d\n", err);
return err;
}

platform_set_drvdata(pdev, nop);

- device_set_wakeup_capable(&pdev->dev,
+ device_set_wakeup_capable(dev,
of_property_read_bool(dn, "wakeup-source"));

return 0;
--
2.43.0