mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 16:12:59 +02:00
usb: gadget: udc: renesas_usb3: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
Convert the Renesas USB3.0 Peripheral controller driver from SIMPLE_DEV_PM_OPS() to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr(). This lets us drop the check for CONFIG_PM_SLEEP, and reduces kernel size in case CONFIG_PM or CONFIG_PM_SLEEP is disabled, while increasing build coverage. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/424d6c7843c5bfd47c0e1d8d02aa030581530bb1.1752087999.git.geert+renesas@glider.be Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
782aee5bd3
commit
a1abefe004
|
|
@ -2973,7 +2973,6 @@ static int renesas_usb3_probe(struct platform_device *pdev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int renesas_usb3_suspend(struct device *dev)
|
||||
{
|
||||
struct renesas_usb3 *usb3 = dev_get_drvdata(dev);
|
||||
|
|
@ -3004,17 +3003,16 @@ static int renesas_usb3_resume(struct device *dev)
|
|||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static SIMPLE_DEV_PM_OPS(renesas_usb3_pm_ops, renesas_usb3_suspend,
|
||||
renesas_usb3_resume);
|
||||
static DEFINE_SIMPLE_DEV_PM_OPS(renesas_usb3_pm_ops, renesas_usb3_suspend,
|
||||
renesas_usb3_resume);
|
||||
|
||||
static struct platform_driver renesas_usb3_driver = {
|
||||
.probe = renesas_usb3_probe,
|
||||
.remove = renesas_usb3_remove,
|
||||
.driver = {
|
||||
.name = udc_name,
|
||||
.pm = &renesas_usb3_pm_ops,
|
||||
.pm = pm_sleep_ptr(&renesas_usb3_pm_ops),
|
||||
.of_match_table = usb3_of_match,
|
||||
},
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user