diff options
| author | Geert Uytterhoeven <geert+renesas@glider.be> | 2025-07-09 21:06:26 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-07-15 19:49:52 +0200 |
| commit | 782aee5bd3419bdf19ca85354f3164db59444de4 (patch) | |
| tree | 60fc42f8a2320aaae59900c7f152d3692e223122 /drivers/usb/renesas_usbhs/common.c | |
| parent | c6efba9271dd9549f8bbf2593d41d902000185a1 (diff) | |
usb: renesas_usbhs: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
Convert the Renesas USBHS driver from SIMPLE_DEV_PM_OPS() to
DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr(). This lets us drop the
__maybe_unused annotations from its suspend and resume callbacks, and
reduces kernel size in case CONFIG_PM or CONFIG_PM_SLEEP is disabled.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/e1136dcd351a19b2e7145436bea1f38faa93a677.1752087914.git.geert+renesas@glider.be
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/renesas_usbhs/common.c')
| -rw-r--r-- | drivers/usb/renesas_usbhs/common.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c index f52418fe3fd4..18a6ef4dce51 100644 --- a/drivers/usb/renesas_usbhs/common.c +++ b/drivers/usb/renesas_usbhs/common.c @@ -823,7 +823,7 @@ static void usbhs_remove(struct platform_device *pdev) usbhs_pipe_remove(priv); } -static __maybe_unused int usbhsc_suspend(struct device *dev) +static int usbhsc_suspend(struct device *dev) { struct usbhs_priv *priv = dev_get_drvdata(dev); struct usbhs_mod *mod = usbhs_mod_get_current(priv); @@ -839,7 +839,7 @@ static __maybe_unused int usbhsc_suspend(struct device *dev) return 0; } -static __maybe_unused int usbhsc_resume(struct device *dev) +static int usbhsc_resume(struct device *dev) { struct usbhs_priv *priv = dev_get_drvdata(dev); struct platform_device *pdev = usbhs_priv_to_pdev(priv); @@ -856,12 +856,12 @@ static __maybe_unused int usbhsc_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(usbhsc_pm_ops, usbhsc_suspend, usbhsc_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(usbhsc_pm_ops, usbhsc_suspend, usbhsc_resume); static struct platform_driver renesas_usbhs_driver = { .driver = { .name = "renesas_usbhs", - .pm = &usbhsc_pm_ops, + .pm = pm_sleep_ptr(&usbhsc_pm_ops), .of_match_table = usbhs_of_match, }, .probe = usbhs_probe, |