Skip to content

Commit

Permalink
ACPI: Update Container hotplug error messages
Browse files Browse the repository at this point in the history
Updated Container hotplug error messages with acpi_handle_<level>()
and pr_<level>().  Removed an unnecessary check to the device arg
in acpi_container_add().

Signed-off-by: Toshi Kani <toshi.kani@hp.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Toshi Kani authored and Rafael J. Wysocki committed Nov 21, 2012
1 parent ab6c570 commit 3d78bd9
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions drivers/acpi/container.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,6 @@ static int acpi_container_add(struct acpi_device *device)
{
struct acpi_container *container;


if (!device) {
printk(KERN_ERR PREFIX "device is NULL\n");
return -EINVAL;
}

container = kzalloc(sizeof(struct acpi_container), GFP_KERNEL);
if (!container)
return -ENOMEM;
Expand Down Expand Up @@ -177,7 +171,7 @@ static void container_notify_cb(acpi_handle handle, u32 type, void *context)
case ACPI_NOTIFY_BUS_CHECK:
/* Fall through */
case ACPI_NOTIFY_DEVICE_CHECK:
printk(KERN_WARNING "Container driver received %s event\n",
pr_debug("Container driver received %s event\n",
(type == ACPI_NOTIFY_BUS_CHECK) ?
"ACPI_NOTIFY_BUS_CHECK" : "ACPI_NOTIFY_DEVICE_CHECK");

Expand All @@ -198,7 +192,7 @@ static void container_notify_cb(acpi_handle handle, u32 type, void *context)

result = container_device_add(&device, handle);
if (result) {
printk(KERN_WARNING "Failed to add container\n");
acpi_handle_warn(handle, "Failed to add container\n");
break;
}

Expand Down

0 comments on commit 3d78bd9

Please sign in to comment.