diff options
-rw-r--r-- | drivers/usb/dwc3/dwc3-pci.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c index 5d746e5d6a0a..105535abcc4a 100644 --- a/drivers/usb/dwc3/dwc3-pci.c +++ b/drivers/usb/dwc3/dwc3-pci.c | |||
@@ -191,7 +191,7 @@ static DEFINE_PCI_DEVICE_TABLE(dwc3_pci_id_table) = { | |||
191 | }; | 191 | }; |
192 | MODULE_DEVICE_TABLE(pci, dwc3_pci_id_table); | 192 | MODULE_DEVICE_TABLE(pci, dwc3_pci_id_table); |
193 | 193 | ||
194 | #ifdef CONFIG_PM | 194 | #ifdef CONFIG_PM_SLEEP |
195 | static int dwc3_pci_suspend(struct device *dev) | 195 | static int dwc3_pci_suspend(struct device *dev) |
196 | { | 196 | { |
197 | struct pci_dev *pci = to_pci_dev(dev); | 197 | struct pci_dev *pci = to_pci_dev(dev); |
@@ -216,23 +216,19 @@ static int dwc3_pci_resume(struct device *dev) | |||
216 | 216 | ||
217 | return 0; | 217 | return 0; |
218 | } | 218 | } |
219 | #endif /* CONFIG_PM_SLEEP */ | ||
219 | 220 | ||
220 | static const struct dev_pm_ops dwc3_pci_dev_pm_ops = { | 221 | static const struct dev_pm_ops dwc3_pci_dev_pm_ops = { |
221 | SET_SYSTEM_SLEEP_PM_OPS(dwc3_pci_suspend, dwc3_pci_resume) | 222 | SET_SYSTEM_SLEEP_PM_OPS(dwc3_pci_suspend, dwc3_pci_resume) |
222 | }; | 223 | }; |
223 | 224 | ||
224 | #define DEV_PM_OPS (&dwc3_pci_dev_pm_ops) | ||
225 | #else | ||
226 | #define DEV_PM_OPS NULL | ||
227 | #endif /* CONFIG_PM */ | ||
228 | |||
229 | static struct pci_driver dwc3_pci_driver = { | 225 | static struct pci_driver dwc3_pci_driver = { |
230 | .name = "dwc3-pci", | 226 | .name = "dwc3-pci", |
231 | .id_table = dwc3_pci_id_table, | 227 | .id_table = dwc3_pci_id_table, |
232 | .probe = dwc3_pci_probe, | 228 | .probe = dwc3_pci_probe, |
233 | .remove = dwc3_pci_remove, | 229 | .remove = dwc3_pci_remove, |
234 | .driver = { | 230 | .driver = { |
235 | .pm = DEV_PM_OPS, | 231 | .pm = &dwc3_pci_dev_pm_ops, |
236 | }, | 232 | }, |
237 | }; | 233 | }; |
238 | 234 | ||