aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3/dwc3-pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/dwc3/dwc3-pci.c')
-rw-r--r--drivers/usb/dwc3/dwc3-pci.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c
index 82a439b075d7..5c471d2fe732 100644
--- a/drivers/usb/dwc3/dwc3-pci.c
+++ b/drivers/usb/dwc3/dwc3-pci.c
@@ -156,45 +156,11 @@ static const struct pci_device_id dwc3_pci_id_table[] = {
156}; 156};
157MODULE_DEVICE_TABLE(pci, dwc3_pci_id_table); 157MODULE_DEVICE_TABLE(pci, dwc3_pci_id_table);
158 158
159#ifdef CONFIG_PM_SLEEP
160static int dwc3_pci_suspend(struct device *dev)
161{
162 struct pci_dev *pci = to_pci_dev(dev);
163
164 pci_disable_device(pci);
165
166 return 0;
167}
168
169static int dwc3_pci_resume(struct device *dev)
170{
171 struct pci_dev *pci = to_pci_dev(dev);
172 int ret;
173
174 ret = pci_enable_device(pci);
175 if (ret) {
176 dev_err(dev, "can't re-enable device --> %d\n", ret);
177 return ret;
178 }
179
180 pci_set_master(pci);
181
182 return 0;
183}
184#endif /* CONFIG_PM_SLEEP */
185
186static const struct dev_pm_ops dwc3_pci_dev_pm_ops = {
187 SET_SYSTEM_SLEEP_PM_OPS(dwc3_pci_suspend, dwc3_pci_resume)
188};
189
190static struct pci_driver dwc3_pci_driver = { 159static struct pci_driver dwc3_pci_driver = {
191 .name = "dwc3-pci", 160 .name = "dwc3-pci",
192 .id_table = dwc3_pci_id_table, 161 .id_table = dwc3_pci_id_table,
193 .probe = dwc3_pci_probe, 162 .probe = dwc3_pci_probe,
194 .remove = dwc3_pci_remove, 163 .remove = dwc3_pci_remove,
195 .driver = {
196 .pm = &dwc3_pci_dev_pm_ops,
197 },
198}; 164};
199 165
200MODULE_AUTHOR("Felipe Balbi <balbi@ti.com>"); 166MODULE_AUTHOR("Felipe Balbi <balbi@ti.com>");