aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2012-12-20 18:36:47 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-01-03 07:09:39 -0500
commite3863094c6f9b2f980d6e7a5cad6b4d03a4dd579 (patch)
tree0fd6c00f9a35bf462cf4c02d0904e2a45527eb6d /drivers
parent636458de36f1fb4cdd318387d2f45604e451b17a (diff)
ACPI: Drop the second argument of acpi_bus_scan()
After the removal of acpi_start_single_object() and acpi_bus_start() the second argument of acpi_bus_scan() is not necessary any more, so drop it and update acpi_bus_check_add() accordingly. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Yinghai Lu <yinghai@kernel.org> Acked-by: Toshi Kani <toshi.kani@hp.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/scan.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 25095bf57bba..eb54f98bb728 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -1551,8 +1551,8 @@ static int acpi_bus_type_and_status(acpi_handle handle, int *type,
1551 return 0; 1551 return 0;
1552} 1552}
1553 1553
1554static acpi_status acpi_bus_check_add(acpi_handle handle, u32 lvl, 1554static acpi_status acpi_bus_check_add(acpi_handle handle, u32 lvl_not_used,
1555 void *context, void **return_value) 1555 void *not_used, void **return_value)
1556{ 1556{
1557 struct acpi_device *device = NULL; 1557 struct acpi_device *device = NULL;
1558 int type; 1558 int type;
@@ -1584,7 +1584,7 @@ static acpi_status acpi_bus_check_add(acpi_handle handle, u32 lvl,
1584 if (!device) 1584 if (!device)
1585 return AE_CTRL_DEPTH; 1585 return AE_CTRL_DEPTH;
1586 1586
1587 device->add_type = context ? ACPI_BUS_ADD_START : ACPI_BUS_ADD_MATCH; 1587 device->add_type = ACPI_BUS_ADD_START;
1588 acpi_hot_add_bind(device); 1588 acpi_hot_add_bind(device);
1589 1589
1590 out: 1590 out:
@@ -1621,18 +1621,16 @@ static acpi_status acpi_bus_device_attach(acpi_handle handle, u32 lvl_not_used,
1621 return status; 1621 return status;
1622} 1622}
1623 1623
1624static int acpi_bus_scan(acpi_handle handle, bool start, 1624static int acpi_bus_scan(acpi_handle handle, struct acpi_device **child)
1625 struct acpi_device **child)
1626{ 1625{
1627 void *device = NULL; 1626 void *device = NULL;
1628 acpi_status status; 1627 acpi_status status;
1629 int ret = -ENODEV; 1628 int ret = -ENODEV;
1630 1629
1631 status = acpi_bus_check_add(handle, 0, (void *)start, &device); 1630 status = acpi_bus_check_add(handle, 0, NULL, &device);
1632 if (ACPI_SUCCESS(status)) 1631 if (ACPI_SUCCESS(status))
1633 acpi_walk_namespace(ACPI_TYPE_ANY, handle, ACPI_UINT32_MAX, 1632 acpi_walk_namespace(ACPI_TYPE_ANY, handle, ACPI_UINT32_MAX,
1634 acpi_bus_check_add, NULL, (void *)start, 1633 acpi_bus_check_add, NULL, NULL, &device);
1635 &device);
1636 1634
1637 if (!device) 1635 if (!device)
1638 goto out; 1636 goto out;
@@ -1676,7 +1674,7 @@ int acpi_bus_add(acpi_handle handle, struct acpi_device **ret)
1676{ 1674{
1677 int err; 1675 int err;
1678 1676
1679 err = acpi_bus_scan(handle, false, ret); 1677 err = acpi_bus_scan(handle, ret);
1680 if (err) 1678 if (err)
1681 return err; 1679 return err;
1682 1680
@@ -1782,7 +1780,7 @@ int __init acpi_scan_init(void)
1782 /* 1780 /*
1783 * Enumerate devices in the ACPI namespace. 1781 * Enumerate devices in the ACPI namespace.
1784 */ 1782 */
1785 result = acpi_bus_scan(ACPI_ROOT_OBJECT, true, &acpi_root); 1783 result = acpi_bus_scan(ACPI_ROOT_OBJECT, &acpi_root);
1786 1784
1787 if (!result) 1785 if (!result)
1788 result = acpi_bus_scan_fixed(); 1786 result = acpi_bus_scan_fixed();