Skip to content

Commit

Permalink
ACPI: Don't treat generic error as ACPI error code in acpi memory hot…
Browse files Browse the repository at this point in the history
…plug driver

Don't treat the generic error as ACPI error code. Otherwise when the generic
code is returned, it will complain the following warning messag:
   >ACPI Exception (acpi_memhotplug-0171): UNKNOWN_STATUS_CODE,
		Cannot get acpi bus device [20080609]
   >ACPI: Cannot find driver data
   > ACPI Error (utglobal-0127): Unknown exception code: 0xFFFFFFED [20080609]
   > Pid: 85, comm: kacpi_notify Not tainted 2.6.27.19-5-default #1
     Call Trace:
     [<ffffffff8020da29>] show_trace_log_lvl+0x41/0x58
     [<ffffffff8049a3da>] dump_stack+0x69/0x6f
    .....

At the same time when the generic error code is returned, the ACPI_EXCEPTION
is replaced by the printk.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Zhao Yakui authored and Len Brown committed Aug 2, 2009
1 parent ed680c4 commit aa7b2b2
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions drivers/acpi/acpi_memhotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@

#define _COMPONENT ACPI_MEMORY_DEVICE_COMPONENT

#undef PREFIX
#define PREFIX "ACPI:memory_hp:"

ACPI_MODULE_NAME("acpi_memhotplug");
MODULE_AUTHOR("Naveen B S <naveen.b.s@intel.com>");
MODULE_DESCRIPTION("Hotplug Mem Driver");
Expand Down Expand Up @@ -153,6 +156,7 @@ acpi_memory_get_device(acpi_handle handle,
acpi_handle phandle;
struct acpi_device *device = NULL;
struct acpi_device *pdevice = NULL;
int result;


if (!acpi_bus_get_device(handle, &device) && device)
Expand All @@ -165,19 +169,19 @@ acpi_memory_get_device(acpi_handle handle,
}

/* Get the parent device */
status = acpi_bus_get_device(phandle, &pdevice);
if (ACPI_FAILURE(status)) {
ACPI_EXCEPTION((AE_INFO, status, "Cannot get acpi bus device"));
result = acpi_bus_get_device(phandle, &pdevice);
if (result) {
printk(KERN_WARNING PREFIX "Cannot get acpi bus device");
return -EINVAL;
}

/*
* Now add the notified device. This creates the acpi_device
* and invokes .add function
*/
status = acpi_bus_add(&device, pdevice, handle, ACPI_BUS_TYPE_DEVICE);
if (ACPI_FAILURE(status)) {
ACPI_EXCEPTION((AE_INFO, status, "Cannot add acpi bus"));
result = acpi_bus_add(&device, pdevice, handle, ACPI_BUS_TYPE_DEVICE);
if (result) {
printk(KERN_WARNING PREFIX "Cannot add acpi bus");
return -EINVAL;
}

Expand Down

0 comments on commit aa7b2b2

Please sign in to comment.