diff options
Diffstat (limited to 'drivers/usb/host/ehci-platform.c')
-rw-r--r-- | drivers/usb/host/ehci-platform.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c index 2f5b9ce3e042..da056fe9d15b 100644 --- a/drivers/usb/host/ehci-platform.c +++ b/drivers/usb/host/ehci-platform.c @@ -311,8 +311,7 @@ static int ehci_platform_remove(struct platform_device *dev) return 0; } -#ifdef CONFIG_PM - +#ifdef CONFIG_PM_SLEEP static int ehci_platform_suspend(struct device *dev) { struct usb_hcd *hcd = dev_get_drvdata(dev); @@ -348,11 +347,7 @@ static int ehci_platform_resume(struct device *dev) ehci_resume(hcd, false); return 0; } - -#else /* !CONFIG_PM */ -#define ehci_platform_suspend NULL -#define ehci_platform_resume NULL -#endif /* CONFIG_PM */ +#endif /* CONFIG_PM_SLEEP */ static const struct of_device_id vt8500_ehci_ids[] = { { .compatible = "via,vt8500-ehci", }, @@ -368,10 +363,8 @@ static const struct platform_device_id ehci_platform_table[] = { }; MODULE_DEVICE_TABLE(platform, ehci_platform_table); -static const struct dev_pm_ops ehci_platform_pm_ops = { - .suspend = ehci_platform_suspend, - .resume = ehci_platform_resume, -}; +static SIMPLE_DEV_PM_OPS(ehci_platform_pm_ops, ehci_platform_suspend, + ehci_platform_resume); static struct platform_driver ehci_platform_driver = { .id_table = ehci_platform_table, |