| .. | .. |
|---|
| 34 | 34 | |
|---|
| 35 | 35 | static struct hc_driver __read_mostly ehci_spear_hc_driver; |
|---|
| 36 | 36 | |
|---|
| 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) |
|---|
| 39 | 38 | { |
|---|
| 40 | 39 | struct usb_hcd *hcd = dev_get_drvdata(dev); |
|---|
| 41 | 40 | bool do_wakeup = device_may_wakeup(dev); |
|---|
| .. | .. |
|---|
| 43 | 42 | return ehci_suspend(hcd, do_wakeup); |
|---|
| 44 | 43 | } |
|---|
| 45 | 44 | |
|---|
| 46 | | -static int ehci_spear_drv_resume(struct device *dev) |
|---|
| 45 | +static int __maybe_unused ehci_spear_drv_resume(struct device *dev) |
|---|
| 47 | 46 | { |
|---|
| 48 | 47 | struct usb_hcd *hcd = dev_get_drvdata(dev); |
|---|
| 49 | 48 | |
|---|
| 50 | 49 | ehci_resume(hcd, false); |
|---|
| 51 | 50 | return 0; |
|---|
| 52 | 51 | } |
|---|
| 53 | | -#endif /* CONFIG_PM_SLEEP */ |
|---|
| 54 | 52 | |
|---|
| 55 | 53 | static SIMPLE_DEV_PM_OPS(ehci_spear_pm_ops, ehci_spear_drv_suspend, |
|---|
| 56 | 54 | ehci_spear_drv_resume); |
|---|
| .. | .. |
|---|
| 155 | 153 | .driver = { |
|---|
| 156 | 154 | .name = "spear-ehci", |
|---|
| 157 | 155 | .bus = &platform_bus_type, |
|---|
| 158 | | - .pm = &ehci_spear_pm_ops, |
|---|
| 156 | + .pm = pm_ptr(&ehci_spear_pm_ops), |
|---|
| 159 | 157 | .of_match_table = spear_ehci_id_table, |
|---|
| 160 | 158 | } |
|---|
| 161 | 159 | }; |
|---|