| 1 | |
| 2 | --- a/drivers/usb/host/pci-quirks.c |
| 3 | +++ b/drivers/usb/host/pci-quirks.c |
| 4 | @@ -432,6 +432,8 @@ reset_needed: |
| 5 | } |
| 6 | EXPORT_SYMBOL_GPL(uhci_check_and_reset_hc); |
| 7 | |
| 8 | +#ifndef CONFIG_PCI_DISABLE_COMMON_QUIRKS |
| 9 | + |
| 10 | static inline int io_type_enabled(struct pci_dev *pdev, unsigned int mask) |
| 11 | { |
| 12 | u16 cmd; |
| 13 | @@ -928,3 +930,5 @@ static void __devinit quirk_usb_early_ha |
| 14 | pci_disable_device(pdev); |
| 15 | } |
| 16 | DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, quirk_usb_early_handoff); |
| 17 | + |
| 18 | +#endif |
| 19 | --- a/drivers/usb/host/pci-quirks.h |
| 20 | +++ b/drivers/usb/host/pci-quirks.h |
| 21 | @@ -8,9 +8,17 @@ int usb_amd_find_chipset_info(void); |
| 22 | void usb_amd_dev_put(void); |
| 23 | void usb_amd_quirk_pll_disable(void); |
| 24 | void usb_amd_quirk_pll_enable(void); |
| 25 | +#if !defined(CONFIG_PCI_DISABLE_COMMON_QUIRKS) |
| 26 | bool usb_is_intel_switchable_xhci(struct pci_dev *pdev); |
| 27 | void usb_enable_xhci_ports(struct pci_dev *xhci_pdev); |
| 28 | #else |
| 29 | +static inline bool usb_is_intel_switchable_xhci(struct pci_dev *pdev) |
| 30 | +{ |
| 31 | + return false; |
| 32 | +} |
| 33 | +static inline void usb_enable_xhci_ports(struct pci_dev *xhci_pdev) {} |
| 34 | +#endif |
| 35 | +#else |
| 36 | static inline void usb_amd_quirk_pll_disable(void) {} |
| 37 | static inline void usb_amd_quirk_pll_enable(void) {} |
| 38 | static inline void usb_amd_dev_put(void) {} |
| 39 | |