projects
/
profile
/
ivi
/
kernel-adaptation-intel-automotive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
USB: mark USB drivers as being GPL only
[profile/ivi/kernel-adaptation-intel-automotive.git]
/
drivers
/
usb
/
core
/
hcd-pci.c
diff --git
a/drivers/usb/core/hcd-pci.c
b/drivers/usb/core/hcd-pci.c
index
edf4300
..
851d5e1
100644
(file)
--- a/
drivers/usb/core/hcd-pci.c
+++ b/
drivers/usb/core/hcd-pci.c
@@
-125,7
+125,7
@@
int usb_hcd_pci_probe (struct pci_dev *dev, const struct pci_device_id *id)
pci_set_master (dev);
pci_set_master (dev);
- retval = usb_add_hcd
(hcd, dev->irq,
IRQF_SHARED);
+ retval = usb_add_hcd
(hcd, dev->irq, IRQF_DISABLED |
IRQF_SHARED);
if (retval != 0)
goto err4;
return retval;
if (retval != 0)
goto err4;
return retval;
@@
-144,7
+144,7
@@
int usb_hcd_pci_probe (struct pci_dev *dev, const struct pci_device_id *id)
dev_err (&dev->dev, "init %s fail, %d\n", pci_name(dev), retval);
return retval;
}
dev_err (&dev->dev, "init %s fail, %d\n", pci_name(dev), retval);
return retval;
}
-EXPORT_SYMBOL
(usb_hcd_pci_probe);
+EXPORT_SYMBOL
_GPL
(usb_hcd_pci_probe);
/* may be called without controller electrically present */
/* may be called without controller electrically present */
@@
-179,7
+179,7
@@
void usb_hcd_pci_remove (struct pci_dev *dev)
usb_put_hcd (hcd);
pci_disable_device(dev);
}
usb_put_hcd (hcd);
pci_disable_device(dev);
}
-EXPORT_SYMBOL
(usb_hcd_pci_remove);
+EXPORT_SYMBOL
_GPL
(usb_hcd_pci_remove);
#ifdef CONFIG_PM
#ifdef CONFIG_PM
@@
-207,7
+207,8
@@
int usb_hcd_pci_suspend (struct pci_dev *dev, pm_message_t message)
* We must ignore the FREEZE vs SUSPEND distinction here, because
* otherwise the swsusp will save (and restore) garbage state.
*/
* We must ignore the FREEZE vs SUSPEND distinction here, because
* otherwise the swsusp will save (and restore) garbage state.
*/
- if (hcd->self.root_hub->dev.power.power_state.event == PM_EVENT_ON)
+ if (!(hcd->state == HC_STATE_SUSPENDED ||
+ hcd->state == HC_STATE_HALT))
return -EBUSY;
if (hcd->driver->suspend) {
return -EBUSY;
if (hcd->driver->suspend) {
@@
-249,6
+250,12
@@
int usb_hcd_pci_suspend (struct pci_dev *dev, pm_message_t message)
pci_disable_device (dev);
}
pci_disable_device (dev);
}
+ if (message.event == PM_EVENT_FREEZE ||
+ message.event == PM_EVENT_PRETHAW) {
+ dev_dbg(hcd->self.controller, "--> no state change\n");
+ goto done;
+ }
+
if (!has_pci_pm) {
dev_dbg (hcd->self.controller, "--> PCI D0/legacy\n");
goto done;
if (!has_pci_pm) {
dev_dbg (hcd->self.controller, "--> PCI D0/legacy\n");
goto done;
@@
-307,7
+314,7
@@
done:
return retval;
}
return retval;
}
-EXPORT_SYMBOL
(usb_hcd_pci_suspend);
+EXPORT_SYMBOL
_GPL
(usb_hcd_pci_suspend);
/**
* usb_hcd_pci_resume - power management resume of a PCI-based HCD
/**
* usb_hcd_pci_resume - power management resume of a PCI-based HCD
@@
-409,7
+416,7
@@
int usb_hcd_pci_resume (struct pci_dev *dev)
return retval;
}
return retval;
}
-EXPORT_SYMBOL
(usb_hcd_pci_resume);
+EXPORT_SYMBOL
_GPL
(usb_hcd_pci_resume);
#endif /* CONFIG_PM */
#endif /* CONFIG_PM */
@@
-428,5
+435,5
@@
void usb_hcd_pci_shutdown (struct pci_dev *dev)
if (hcd->driver->shutdown)
hcd->driver->shutdown(hcd);
}
if (hcd->driver->shutdown)
hcd->driver->shutdown(hcd);
}
-EXPORT_SYMBOL
(usb_hcd_pci_shutdown);
+EXPORT_SYMBOL
_GPL
(usb_hcd_pci_shutdown);