Commit 9656767a authored by Len Brown's avatar Len Brown Committed by Len Brown

[ACPI] fix "Error getting context for object" warning

http://bugzilla.kernel.org/show_bug.cgi?id=3805Signed-off-by: default avatarDavid Shaohua Li <shaohua.li@intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent c46ce3f5
...@@ -77,7 +77,7 @@ acpi_bus_get_device ( ...@@ -77,7 +77,7 @@ acpi_bus_get_device (
status = acpi_get_data(handle, acpi_bus_data_handler, (void**) device); status = acpi_get_data(handle, acpi_bus_data_handler, (void**) device);
if (ACPI_FAILURE(status) || !*device) { if (ACPI_FAILURE(status) || !*device) {
ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Error getting context for object [%p]\n", ACPI_DEBUG_PRINT((ACPI_DB_WARN, "No context for object [%p]\n",
handle)); handle));
return_VALUE(-ENODEV); return_VALUE(-ENODEV);
} }
......
...@@ -236,6 +236,8 @@ static acpi_status __init pnpacpi_add_device_handler(acpi_handle handle, ...@@ -236,6 +236,8 @@ static acpi_status __init pnpacpi_add_device_handler(acpi_handle handle,
if (!acpi_bus_get_device(handle, &device)) if (!acpi_bus_get_device(handle, &device))
pnpacpi_add_device(device); pnpacpi_add_device(device);
else
return AE_CTRL_DEPTH;
return AE_OK; return AE_OK;
} }
...@@ -247,9 +249,7 @@ int __init pnpacpi_init(void) ...@@ -247,9 +249,7 @@ int __init pnpacpi_init(void)
} }
pnp_info("PnP ACPI init"); pnp_info("PnP ACPI init");
pnp_register_protocol(&pnpacpi_protocol); pnp_register_protocol(&pnpacpi_protocol);
acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, acpi_get_devices(NULL, pnpacpi_add_device_handler, NULL, NULL);
ACPI_UINT32_MAX, pnpacpi_add_device_handler,
NULL, NULL);
pnp_info("PnP ACPI: found %d devices", num); pnp_info("PnP ACPI: found %d devices", num);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment