hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/usb/host/ehci-spear.c
....@@ -34,8 +34,7 @@
3434
3535 static struct hc_driver __read_mostly ehci_spear_hc_driver;
3636
37
-#ifdef CONFIG_PM_SLEEP
38
-static int ehci_spear_drv_suspend(struct device *dev)
37
+static int __maybe_unused ehci_spear_drv_suspend(struct device *dev)
3938 {
4039 struct usb_hcd *hcd = dev_get_drvdata(dev);
4140 bool do_wakeup = device_may_wakeup(dev);
....@@ -43,14 +42,13 @@
4342 return ehci_suspend(hcd, do_wakeup);
4443 }
4544
46
-static int ehci_spear_drv_resume(struct device *dev)
45
+static int __maybe_unused ehci_spear_drv_resume(struct device *dev)
4746 {
4847 struct usb_hcd *hcd = dev_get_drvdata(dev);
4948
5049 ehci_resume(hcd, false);
5150 return 0;
5251 }
53
-#endif /* CONFIG_PM_SLEEP */
5452
5553 static SIMPLE_DEV_PM_OPS(ehci_spear_pm_ops, ehci_spear_drv_suspend,
5654 ehci_spear_drv_resume);
....@@ -155,7 +153,7 @@
155153 .driver = {
156154 .name = "spear-ehci",
157155 .bus = &platform_bus_type,
158
- .pm = &ehci_spear_pm_ops,
156
+ .pm = pm_ptr(&ehci_spear_pm_ops),
159157 .of_match_table = spear_ehci_id_table,
160158 }
161159 };