diff options
author | Adrian Bunk <bunk@stusta.de> | 2006-12-18 23:13:15 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-02-07 18:50:04 -0500 |
commit | c30ca1db39cecade07143112ecfac09ec6b08e3f (patch) | |
tree | 003c466c5c4e2fe225aa6af02a91d5e2a144a93d /drivers/pci/quirks.c | |
parent | 81b1955eef786c1b2fe29f6783543ce13d8b0bc4 (diff) |
PCI: quirks.c: cleanup
This patch contains the following cleanups:
- move all EXPORT_SYMBOL's directly below the code they are exporting
- move all DECLARE_PCI_FIXUP_*'s directly below the functions they
are calling
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/quirks.c')
-rw-r--r-- | drivers/pci/quirks.c | 42 |
1 files changed, 17 insertions, 25 deletions
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index c913ea4e545c..1d04ca02dd0f 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
@@ -61,7 +61,8 @@ DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82441, quirk_p | |||
61 | 61 | ||
62 | This appears to be BIOS not version dependent. So presumably there is a | 62 | This appears to be BIOS not version dependent. So presumably there is a |
63 | chipset level fix */ | 63 | chipset level fix */ |
64 | int isa_dma_bridge_buggy; /* Exported */ | 64 | int isa_dma_bridge_buggy; |
65 | EXPORT_SYMBOL(isa_dma_bridge_buggy); | ||
65 | 66 | ||
66 | static void __devinit quirk_isa_dma_hangs(struct pci_dev *dev) | 67 | static void __devinit quirk_isa_dma_hangs(struct pci_dev *dev) |
67 | { | 68 | { |
@@ -83,6 +84,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_CBUS_2, quirk_isa_d | |||
83 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_CBUS_3, quirk_isa_dma_hangs ); | 84 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_CBUS_3, quirk_isa_dma_hangs ); |
84 | 85 | ||
85 | int pci_pci_problems; | 86 | int pci_pci_problems; |
87 | EXPORT_SYMBOL(pci_pci_problems); | ||
86 | 88 | ||
87 | /* | 89 | /* |
88 | * Chipsets where PCI->PCI transfers vanish or hang | 90 | * Chipsets where PCI->PCI transfers vanish or hang |
@@ -94,6 +96,8 @@ static void __devinit quirk_nopcipci(struct pci_dev *dev) | |||
94 | pci_pci_problems |= PCIPCI_FAIL; | 96 | pci_pci_problems |= PCIPCI_FAIL; |
95 | } | 97 | } |
96 | } | 98 | } |
99 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5597, quirk_nopcipci ); | ||
100 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_496, quirk_nopcipci ); | ||
97 | 101 | ||
98 | static void __devinit quirk_nopciamd(struct pci_dev *dev) | 102 | static void __devinit quirk_nopciamd(struct pci_dev *dev) |
99 | { | 103 | { |
@@ -105,9 +109,6 @@ static void __devinit quirk_nopciamd(struct pci_dev *dev) | |||
105 | pci_pci_problems |= PCIAGP_FAIL; | 109 | pci_pci_problems |= PCIAGP_FAIL; |
106 | } | 110 | } |
107 | } | 111 | } |
108 | |||
109 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5597, quirk_nopcipci ); | ||
110 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_496, quirk_nopcipci ); | ||
111 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8151_0, quirk_nopciamd ); | 112 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8151_0, quirk_nopciamd ); |
112 | 113 | ||
113 | /* | 114 | /* |
@@ -1136,6 +1137,14 @@ static void quirk_sis_96x_smbus(struct pci_dev *dev) | |||
1136 | pci_write_config_byte(dev, 0x77, val & ~0x10); | 1137 | pci_write_config_byte(dev, 0x77, val & ~0x10); |
1137 | } | 1138 | } |
1138 | } | 1139 | } |
1140 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_961, quirk_sis_96x_smbus ); | ||
1141 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_962, quirk_sis_96x_smbus ); | ||
1142 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_963, quirk_sis_96x_smbus ); | ||
1143 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_LPC, quirk_sis_96x_smbus ); | ||
1144 | DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_961, quirk_sis_96x_smbus ); | ||
1145 | DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_962, quirk_sis_96x_smbus ); | ||
1146 | DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_963, quirk_sis_96x_smbus ); | ||
1147 | DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_LPC, quirk_sis_96x_smbus ); | ||
1139 | 1148 | ||
1140 | /* | 1149 | /* |
1141 | * ... This is further complicated by the fact that some SiS96x south | 1150 | * ... This is further complicated by the fact that some SiS96x south |
@@ -1173,6 +1182,8 @@ static void quirk_sis_503(struct pci_dev *dev) | |||
1173 | dev->device = devid; | 1182 | dev->device = devid; |
1174 | quirk_sis_96x_smbus(dev); | 1183 | quirk_sis_96x_smbus(dev); |
1175 | } | 1184 | } |
1185 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_503, quirk_sis_503 ); | ||
1186 | DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_503, quirk_sis_503 ); | ||
1176 | 1187 | ||
1177 | static void __init quirk_sis_96x_compatible(struct pci_dev *dev) | 1188 | static void __init quirk_sis_96x_compatible(struct pci_dev *dev) |
1178 | { | 1189 | { |
@@ -1185,8 +1196,6 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_650, quirk_sis_96x_ | |||
1185 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_651, quirk_sis_96x_compatible ); | 1196 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_651, quirk_sis_96x_compatible ); |
1186 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_735, quirk_sis_96x_compatible ); | 1197 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_735, quirk_sis_96x_compatible ); |
1187 | 1198 | ||
1188 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_503, quirk_sis_503 ); | ||
1189 | DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_503, quirk_sis_503 ); | ||
1190 | /* | 1199 | /* |
1191 | * On ASUS A8V and A8V Deluxe boards, the onboard AC97 audio controller | 1200 | * On ASUS A8V and A8V Deluxe boards, the onboard AC97 audio controller |
1192 | * and MC97 modem controller are disabled when a second PCI soundcard is | 1201 | * and MC97 modem controller are disabled when a second PCI soundcard is |
@@ -1217,21 +1226,8 @@ static void asus_hides_ac97_lpc(struct pci_dev *dev) | |||
1217 | } | 1226 | } |
1218 | } | 1227 | } |
1219 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237, asus_hides_ac97_lpc ); | 1228 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237, asus_hides_ac97_lpc ); |
1220 | |||
1221 | |||
1222 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_961, quirk_sis_96x_smbus ); | ||
1223 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_962, quirk_sis_96x_smbus ); | ||
1224 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_963, quirk_sis_96x_smbus ); | ||
1225 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_LPC, quirk_sis_96x_smbus ); | ||
1226 | |||
1227 | DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237, asus_hides_ac97_lpc ); | 1229 | DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237, asus_hides_ac97_lpc ); |
1228 | 1230 | ||
1229 | |||
1230 | DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_961, quirk_sis_96x_smbus ); | ||
1231 | DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_962, quirk_sis_96x_smbus ); | ||
1232 | DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_963, quirk_sis_96x_smbus ); | ||
1233 | DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_LPC, quirk_sis_96x_smbus ); | ||
1234 | |||
1235 | #if defined(CONFIG_ATA) || defined(CONFIG_ATA_MODULE) | 1231 | #if defined(CONFIG_ATA) || defined(CONFIG_ATA_MODULE) |
1236 | 1232 | ||
1237 | /* | 1233 | /* |
@@ -1276,7 +1272,6 @@ static void quirk_jmicron_dualfn(struct pci_dev *pdev) | |||
1276 | break; | 1272 | break; |
1277 | } | 1273 | } |
1278 | } | 1274 | } |
1279 | |||
1280 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, quirk_jmicron_dualfn); | 1275 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, quirk_jmicron_dualfn); |
1281 | DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, quirk_jmicron_dualfn); | 1276 | DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, quirk_jmicron_dualfn); |
1282 | 1277 | ||
@@ -1420,6 +1415,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, quirk_intel_ide_co | |||
1420 | 1415 | ||
1421 | 1416 | ||
1422 | int pcie_mch_quirk; | 1417 | int pcie_mch_quirk; |
1418 | EXPORT_SYMBOL(pcie_mch_quirk); | ||
1423 | 1419 | ||
1424 | static void __devinit quirk_pcie_mch(struct pci_dev *pdev) | 1420 | static void __devinit quirk_pcie_mch(struct pci_dev *pdev) |
1425 | { | 1421 | { |
@@ -1646,6 +1642,7 @@ void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev) | |||
1646 | } | 1642 | } |
1647 | pci_do_fixups(dev, start, end); | 1643 | pci_do_fixups(dev, start, end); |
1648 | } | 1644 | } |
1645 | EXPORT_SYMBOL(pci_fixup_device); | ||
1649 | 1646 | ||
1650 | /* Enable 1k I/O space granularity on the Intel P64H2 */ | 1647 | /* Enable 1k I/O space granularity on the Intel P64H2 */ |
1651 | static void __devinit quirk_p64h2_1k_io(struct pci_dev *dev) | 1648 | static void __devinit quirk_p64h2_1k_io(struct pci_dev *dev) |
@@ -1788,8 +1785,3 @@ static void __devinit quirk_nvidia_ck804_msi_ht_cap(struct pci_dev *dev) | |||
1788 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_CK804_PCIE, | 1785 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_CK804_PCIE, |
1789 | quirk_nvidia_ck804_msi_ht_cap); | 1786 | quirk_nvidia_ck804_msi_ht_cap); |
1790 | #endif /* CONFIG_PCI_MSI */ | 1787 | #endif /* CONFIG_PCI_MSI */ |
1791 | |||
1792 | EXPORT_SYMBOL(pcie_mch_quirk); | ||
1793 | #ifdef CONFIG_HOTPLUG | ||
1794 | EXPORT_SYMBOL(pci_fixup_device); | ||
1795 | #endif | ||