summaryrefslogtreecommitdiff
path: root/drivers/pci
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2012-07-16 09:17:43 -0600
committerBjorn Helgaas <bhelgaas@google.com>2012-07-16 09:17:43 -0600
commit8d20e2cfeb4a098a4dd0bd637c5ea93aa9e84983 (patch)
tree2ec88f9533c6bd4de1efd5dfe09762e381739aa0 /drivers/pci
parentcfeeb34bc04648a61840e5376925cf9094da5ea6 (diff)
parent95df8b8708a8b381bf276d83c56f7b4e7de04a71 (diff)
downloadlinux-3.10-8d20e2cfeb4a098a4dd0bd637c5ea93aa9e84983.tar.gz
linux-3.10-8d20e2cfeb4a098a4dd0bd637c5ea93aa9e84983.tar.bz2
linux-3.10-8d20e2cfeb4a098a4dd0bd637c5ea93aa9e84983.zip
Merge branch 'pci/myron-final-fixups-v2' into next
* pci/myron-final-fixups-v2: PCI: fix undefined reference to 'pci_fixup_final_inited'
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/bus.c4
-rw-r--r--drivers/pci/quirks.c20
2 files changed, 5 insertions, 19 deletions
diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c
index b511bd4e3f7..4b0970b46e0 100644
--- a/drivers/pci/bus.c
+++ b/drivers/pci/bus.c
@@ -164,10 +164,8 @@ pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res,
int pci_bus_add_device(struct pci_dev *dev)
{
int retval;
- extern bool pci_fixup_final_inited;
- if (pci_fixup_final_inited)
- pci_fixup_device(pci_fixup_final, dev);
+ pci_fixup_device(pci_fixup_final, dev);
retval = device_add(&dev->dev);
if (retval)
return retval;
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 52f44b58945..003f356a897 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -2956,6 +2956,7 @@ extern struct pci_fixup __end_pci_fixups_resume_early[];
extern struct pci_fixup __start_pci_fixups_suspend[];
extern struct pci_fixup __end_pci_fixups_suspend[];
+static bool pci_apply_fixup_final_quirks;
void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev)
{
@@ -2973,6 +2974,8 @@ void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev)
break;
case pci_fixup_final:
+ if (!pci_apply_fixup_final_quirks)
+ return;
start = __start_pci_fixups_final;
end = __end_pci_fixups_final;
break;
@@ -3006,21 +3009,6 @@ void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev)
EXPORT_SYMBOL(pci_fixup_device);
-/*
- * The global variable 'pci_fixup_final_inited' is being used as a interim
- * solution for calling the final quirks only during hot-plug events (not
- * during boot processing).
- *
- * When the boot path's PCI device setup sequencing is addressed, we can
- * remove the instance, and usages of, 'pci_fixup_final_inited' along with
- * removing 'fs_initcall_sync(pci_apply_final_quirks);' and end up with a
- * single, uniform, solution that satisfies both the boot path and the
- * various hot-plug event paths.
- *
- * ToDo: Remove 'pci_fixup_final_inited'
- */
-bool pci_fixup_final_inited;
-
static int __init pci_apply_final_quirks(void)
{
struct pci_dev *dev = NULL;
@@ -3031,6 +3019,7 @@ static int __init pci_apply_final_quirks(void)
printk(KERN_DEBUG "PCI: CLS %u bytes\n",
pci_cache_line_size << 2);
+ pci_apply_fixup_final_quirks = true;
for_each_pci_dev(dev) {
pci_fixup_device(pci_fixup_final, dev);
/*
@@ -3051,7 +3040,6 @@ static int __init pci_apply_final_quirks(void)
pci_cache_line_size = pci_dfl_cache_line_size;
}
}
- pci_fixup_final_inited = 1;
if (!pci_cache_line_size) {
printk(KERN_DEBUG "PCI: CLS %u bytes, default %u\n",