aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-08-02 04:13:17 -0400
committerFelipe Balbi <balbi@ti.com>2013-08-02 04:19:49 -0400
commitfb74d282d29dbb39ef20211a9cf2883f9f593bdd (patch)
tree584774a38a2c36523d898488b4a623b5669dabd5 /drivers
parent941ea3616c747545d0278fc432fb7919b6d0d8f0 (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')
-rw-r--r--drivers/usb/dwc3/dwc3-pci.c10
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};
192MODULE_DEVICE_TABLE(pci, dwc3_pci_id_table); 192MODULE_DEVICE_TABLE(pci, dwc3_pci_id_table);
193 193
194#ifdef CONFIG_PM 194#ifdef CONFIG_PM_SLEEP
195static int dwc3_pci_suspend(struct device *dev) 195static 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
220static const struct dev_pm_ops dwc3_pci_dev_pm_ops = { 221static 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
229static struct pci_driver dwc3_pci_driver = { 225static 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