.. | .. |
---|
37 | 37 | |
---|
38 | 38 | static struct hc_driver __read_mostly ehci_npcm7xx_hc_driver; |
---|
39 | 39 | |
---|
40 | | -#ifdef CONFIG_PM_SLEEP |
---|
41 | | -static int ehci_npcm7xx_drv_suspend(struct device *dev) |
---|
| 40 | +static int __maybe_unused ehci_npcm7xx_drv_suspend(struct device *dev) |
---|
42 | 41 | { |
---|
43 | 42 | struct usb_hcd *hcd = dev_get_drvdata(dev); |
---|
44 | 43 | bool do_wakeup = device_may_wakeup(dev); |
---|
.. | .. |
---|
46 | 45 | return ehci_suspend(hcd, do_wakeup); |
---|
47 | 46 | } |
---|
48 | 47 | |
---|
49 | | -static int ehci_npcm7xx_drv_resume(struct device *dev) |
---|
| 48 | +static int __maybe_unused ehci_npcm7xx_drv_resume(struct device *dev) |
---|
50 | 49 | { |
---|
51 | 50 | struct usb_hcd *hcd = dev_get_drvdata(dev); |
---|
52 | 51 | |
---|
53 | 52 | ehci_resume(hcd, false); |
---|
54 | 53 | return 0; |
---|
55 | 54 | } |
---|
56 | | -#endif /* CONFIG_PM_SLEEP */ |
---|
57 | 55 | |
---|
58 | 56 | static SIMPLE_DEV_PM_OPS(ehci_npcm7xx_pm_ops, ehci_npcm7xx_drv_suspend, |
---|
59 | 57 | ehci_npcm7xx_drv_resume); |
---|
.. | .. |
---|
183 | 181 | .driver = { |
---|
184 | 182 | .name = "npcm7xx-ehci", |
---|
185 | 183 | .bus = &platform_bus_type, |
---|
186 | | - .pm = &ehci_npcm7xx_pm_ops, |
---|
| 184 | + .pm = pm_ptr(&ehci_npcm7xx_pm_ops), |
---|
187 | 185 | .of_match_table = npcm7xx_ehci_id_table, |
---|
188 | 186 | } |
---|
189 | 187 | }; |
---|