hc
2024-05-16 8d2a02b24d66aa359e83eebc1ed3c0f85367a1cb
kernel/drivers/usb/host/ehci-npcm7xx.c
....@@ -37,8 +37,7 @@
3737
3838 static struct hc_driver __read_mostly ehci_npcm7xx_hc_driver;
3939
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)
4241 {
4342 struct usb_hcd *hcd = dev_get_drvdata(dev);
4443 bool do_wakeup = device_may_wakeup(dev);
....@@ -46,14 +45,13 @@
4645 return ehci_suspend(hcd, do_wakeup);
4746 }
4847
49
-static int ehci_npcm7xx_drv_resume(struct device *dev)
48
+static int __maybe_unused ehci_npcm7xx_drv_resume(struct device *dev)
5049 {
5150 struct usb_hcd *hcd = dev_get_drvdata(dev);
5251
5352 ehci_resume(hcd, false);
5453 return 0;
5554 }
56
-#endif /* CONFIG_PM_SLEEP */
5755
5856 static SIMPLE_DEV_PM_OPS(ehci_npcm7xx_pm_ops, ehci_npcm7xx_drv_suspend,
5957 ehci_npcm7xx_drv_resume);
....@@ -183,7 +181,7 @@
183181 .driver = {
184182 .name = "npcm7xx-ehci",
185183 .bus = &platform_bus_type,
186
- .pm = &ehci_npcm7xx_pm_ops,
184
+ .pm = pm_ptr(&ehci_npcm7xx_pm_ops),
187185 .of_match_table = npcm7xx_ehci_id_table,
188186 }
189187 };