ACPI: Update Container hotplug error messages
authorToshi Kani <toshi.kani@hp.com>
Tue, 20 Nov 2012 23:42:29 +0000 (23:42 +0000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 21 Nov 2012 22:20:23 +0000 (23:20 +0100)
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>
drivers/acpi/container.c

index 69e2d6be910cd08b1c5bd4b3e84ea0a1ceedeb33..811910b50b75c2359505140e481e95398040d884 100644 (file)
@@ -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;
@@ -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");
 
@@ -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;
                }