aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorJiang Liu <jiang.liu@huawei.com>2013-05-28 19:59:25 -0400
committerBjorn Helgaas <bhelgaas@google.com>2013-05-29 16:35:49 -0400
commitbbebed6423f5b281f9ca314518531f90424f6f57 (patch)
treece06d37e5b16f8be0a785cc5099c49404a0c4c4c /drivers/acpi
parentbfe2414aecca03d884f680d5cf1d612c7813ee33 (diff)
PCI/ACPI: Remove unused global list acpi_pci_roots
Now the global list acpi_pci_roots pci_root.c is useless, remove it. Signed-off-by: Jiang Liu <jiang.liu@huawei.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Cc: Len Brown <lenb@kernel.org>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/pci_root.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index 852fb96f94e5..18b7ab2dee4f 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -65,10 +65,6 @@ static struct acpi_scan_handler pci_root_handler = {
65 .detach = acpi_pci_root_remove, 65 .detach = acpi_pci_root_remove,
66}; 66};
67 67
68/* Lock to protect both acpi_pci_roots lists */
69static DEFINE_MUTEX(acpi_pci_root_lock);
70static LIST_HEAD(acpi_pci_roots);
71
72static DEFINE_MUTEX(osc_lock); 68static DEFINE_MUTEX(osc_lock);
73 69
74/** 70/**
@@ -423,7 +419,6 @@ static int acpi_pci_root_add(struct acpi_device *device,
423 } 419 }
424 } 420 }
425 421
426 INIT_LIST_HEAD(&root->node);
427 root->device = device; 422 root->device = device;
428 root->segment = segment & 0xFFFF; 423 root->segment = segment & 0xFFFF;
429 strcpy(acpi_device_name(device), ACPI_PCI_ROOT_DEVICE_NAME); 424 strcpy(acpi_device_name(device), ACPI_PCI_ROOT_DEVICE_NAME);
@@ -447,10 +442,6 @@ static int acpi_pci_root_add(struct acpi_device *device,
447 * TBD: Need PCI interface for enumeration/configuration of roots. 442 * TBD: Need PCI interface for enumeration/configuration of roots.
448 */ 443 */
449 444
450 mutex_lock(&acpi_pci_root_lock);
451 list_add_tail(&root->node, &acpi_pci_roots);
452 mutex_unlock(&acpi_pci_root_lock);
453
454 /* 445 /*
455 * Scan the Root Bridge 446 * Scan the Root Bridge
456 * -------------------- 447 * --------------------
@@ -464,7 +455,7 @@ static int acpi_pci_root_add(struct acpi_device *device,
464 "Bus %04x:%02x not present in PCI namespace\n", 455 "Bus %04x:%02x not present in PCI namespace\n",
465 root->segment, (unsigned int)root->secondary.start); 456 root->segment, (unsigned int)root->secondary.start);
466 result = -ENODEV; 457 result = -ENODEV;
467 goto out_del_root; 458 goto end;
468 } 459 }
469 460
470 /* Indicate support for various _OSC capabilities. */ 461 /* Indicate support for various _OSC capabilities. */
@@ -545,11 +536,6 @@ static int acpi_pci_root_add(struct acpi_device *device,
545 pci_bus_add_devices(root->bus); 536 pci_bus_add_devices(root->bus);
546 return 1; 537 return 1;
547 538
548out_del_root:
549 mutex_lock(&acpi_pci_root_lock);
550 list_del(&root->node);
551 mutex_unlock(&acpi_pci_root_lock);
552
553end: 539end:
554 kfree(root); 540 kfree(root);
555 return result; 541 return result;
@@ -566,9 +552,6 @@ static void acpi_pci_root_remove(struct acpi_device *device)
566 552
567 pci_remove_root_bus(root->bus); 553 pci_remove_root_bus(root->bus);
568 554
569 mutex_lock(&acpi_pci_root_lock);
570 list_del(&root->node);
571 mutex_unlock(&acpi_pci_root_lock);
572 kfree(root); 555 kfree(root);
573} 556}
574 557