diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-08-02 04:13:17 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-08-02 04:19:49 -0400 |
commit | fb74d282d29dbb39ef20211a9cf2883f9f593bdd (patch) | |
tree | 584774a38a2c36523d898488b4a623b5669dabd5 /drivers/usb/dwc3/dwc3-pci.c | |
parent | 941ea3616c747545d0278fc432fb7919b6d0d8f0 (diff) |
usb: dwc3: pci: add CONFIG_PM_SLEEP to suspend/resume functions
Add CONFIG_PM_SLEEP to suspend/resume functions to fix the following
build warning when CONFIG_PM_SLEEP is not selected. This is because
sleep PM callbacks defined by SET_SYSTEM_SLEEP_PM_OPS are only used
when the CONFIG_PM_SLEEP is enabled. Unnecessary CONFIG_PM ifdefs
are removed.
drivers/usb/dwc3/dwc3-pci.c:215:12: warning: 'dwc3_pci_suspend' defined but not used [-Wunused-function]
drivers/usb/dwc3/dwc3-pci.c:224:12: warning: 'dwc3_pci_resume' defined but not used [-Wunused-function]
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc3/dwc3-pci.c')
-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 | ||