ACPI: replace ACPI_DEBUG_PRINT((ACPI_DB_ERROR, ...) with printk
authorLin Ming <ming.m.lin@intel.com>
Sun, 28 Sep 2008 06:51:56 +0000 (14:51 +0800)
committerLen Brown <len.brown@intel.com>
Thu, 23 Oct 2008 03:14:41 +0000 (23:14 -0400)
ACPI_DB_ERROR and ACPI_DB_WARN were removed from ACPICA core.
So replace ACPI_DEBUG_PRINT((ACPI_DB_ERROR, ...) with printk(KERN_ERR PREFIX ...)
and ACPI_DEBUG_PRINT((ACPI_DB_WARN, ...) with printk(KERN_WARNING PREFIX ...)

We do not use ACPI_ERROR/ACPI_WARNING since they're not exported, see
-------------------------------------------------------------
commit 6468463abd7051fcc29f3ee7c931f9bbbb26f5a4
Author: Len Brown <len.brown@intel.com>
Date:   Mon Jun 26 23:41:38 2006 -0400

    ACPI: un-export ACPI_ERROR() -- use printk(KERN_ERR...)

Signed-off-by: Len Brown <len.brown@intel.com>
-------------------------------------------------------------

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/acpi_memhotplug.c
drivers/acpi/cm_sbs.c
drivers/acpi/fan.c
drivers/acpi/osl.c
drivers/acpi/processor_perflib.c
drivers/acpi/processor_throttling.c
drivers/acpi/scan.c
drivers/acpi/system.c
drivers/acpi/thermal.c
drivers/acpi/video.c

index 5f1127ad5a9538fde4cdaa8e4a6658f2880928a7..bbad9b6c2c887273a6e66d8e98a6028ee1fec297 100644 (file)
@@ -454,8 +454,8 @@ static int acpi_memory_device_start (struct acpi_device *device)
                /* call add_memory func */
                result = acpi_memory_enable_device(mem_device);
                if (result)
-                       ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
-                               "Error in acpi_memory_enable_device\n"));
+                       printk(KERN_ERR PREFIX
+                               "Error in acpi_memory_enable_device\n");
        }
        return result;
 }
index f9db4f444bd0f814fe4ffbec8252e4227df981dc..4441e84b28a9a2e652d00445d2dbf1b722ac8e90 100644 (file)
@@ -52,8 +52,8 @@ struct proc_dir_entry *acpi_lock_ac_dir(void)
        if (acpi_ac_dir) {
                lock_ac_dir_cnt++;
        } else {
-               ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
-                                 "Cannot create %s\n", ACPI_AC_CLASS));
+               printk(KERN_ERR PREFIX
+                                 "Cannot create %s\n", ACPI_AC_CLASS);
        }
        mutex_unlock(&cm_sbs_mutex);
        return acpi_ac_dir;
@@ -83,8 +83,8 @@ struct proc_dir_entry *acpi_lock_battery_dir(void)
        if (acpi_battery_dir) {
                lock_battery_dir_cnt++;
        } else {
-               ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
-                                 "Cannot create %s\n", ACPI_BATTERY_CLASS));
+               printk(KERN_ERR PREFIX
+                                 "Cannot create %s\n", ACPI_BATTERY_CLASS);
        }
        mutex_unlock(&cm_sbs_mutex);
        return acpi_battery_dir;
index 2655bc1b4eebc7cbb02a16afc715e703dd0e3499..dfc0486ffaff36bcaefd11eefbcd9bb076306982 100644 (file)
@@ -327,8 +327,8 @@ static int acpi_fan_resume(struct acpi_device *device)
 
        result = acpi_bus_get_power(device->handle, &power_state);
        if (result) {
-               ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
-                                 "Error reading fan power state\n"));
+               printk(KERN_ERR PREFIX
+                                 "Error reading fan power state\n");
                return result;
        }
 
index 235a1386888a42fb19c59f6080155a6e774071b3..1420a9f69e5d0cbf11014197a843bd56a6cad4a1 100644 (file)
@@ -729,8 +729,8 @@ acpi_status acpi_os_execute(acpi_execute_type type,
        INIT_WORK(&dpc->work, acpi_os_execute_deferred);
        queue = (type == OSL_NOTIFY_HANDLER) ? kacpi_notify_wq : kacpid_wq;
        if (!queue_work(queue, &dpc->work)) {
-               ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
-                         "Call to queue_work() failed.\n"));
+               printk(KERN_ERR PREFIX
+                         "Call to queue_work() failed.\n");
                status = AE_ERROR;
                kfree(dpc);
        }
index 80c251ec6d2aac7dff658a9c6df5fec5733bc168..e5c457b45f2b7b6ce303b70c31368488087da382 100644 (file)
@@ -524,13 +524,13 @@ static int acpi_processor_get_psd(struct acpi_processor   *pr)
 
        psd = buffer.pointer;
        if (!psd || (psd->type != ACPI_TYPE_PACKAGE)) {
-               ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _PSD data\n"));
+               printk(KERN_ERR PREFIX "Invalid _PSD data\n");
                result = -EFAULT;
                goto end;
        }
 
        if (psd->package.count != 1) {
-               ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _PSD data\n"));
+               printk(KERN_ERR PREFIX "Invalid _PSD data\n");
                result = -EFAULT;
                goto end;
        }
@@ -543,19 +543,19 @@ static int acpi_processor_get_psd(struct acpi_processor   *pr)
        status = acpi_extract_package(&(psd->package.elements[0]),
                &format, &state);
        if (ACPI_FAILURE(status)) {
-               ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _PSD data\n"));
+               printk(KERN_ERR PREFIX "Invalid _PSD data\n");
                result = -EFAULT;
                goto end;
        }
 
        if (pdomain->num_entries != ACPI_PSD_REV0_ENTRIES) {
-               ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unknown _PSD:num_entries\n"));
+               printk(KERN_ERR PREFIX "Unknown _PSD:num_entries\n");
                result = -EFAULT;
                goto end;
        }
 
        if (pdomain->revision != ACPI_PSD_REV0_REVISION) {
-               ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unknown _PSD:revision\n"));
+               printk(KERN_ERR PREFIX "Unknown _PSD:revision\n");
                result = -EFAULT;
                goto end;
        }
index a56fc6c4394bb1dab26cb06527d3f89239333683..e89a25824f2a1244eff5bdb7c5e00467b2f48a5d 100644 (file)
@@ -528,13 +528,13 @@ static int acpi_processor_get_tsd(struct acpi_processor *pr)
 
        tsd = buffer.pointer;
        if (!tsd || (tsd->type != ACPI_TYPE_PACKAGE)) {
-               ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _TSD data\n"));
+               printk(KERN_ERR PREFIX "Invalid _TSD data\n");
                result = -EFAULT;
                goto end;
        }
 
        if (tsd->package.count != 1) {
-               ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _TSD data\n"));
+               printk(KERN_ERR PREFIX "Invalid _TSD data\n");
                result = -EFAULT;
                goto end;
        }
@@ -547,19 +547,19 @@ static int acpi_processor_get_tsd(struct acpi_processor *pr)
        status = acpi_extract_package(&(tsd->package.elements[0]),
                                      &format, &state);
        if (ACPI_FAILURE(status)) {
-               ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _TSD data\n"));
+               printk(KERN_ERR PREFIX "Invalid _TSD data\n");
                result = -EFAULT;
                goto end;
        }
 
        if (pdomain->num_entries != ACPI_TSD_REV0_ENTRIES) {
-               ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unknown _TSD:num_entries\n"));
+               printk(KERN_ERR PREFIX "Unknown _TSD:num_entries\n");
                result = -EFAULT;
                goto end;
        }
 
        if (pdomain->revision != ACPI_TSD_REV0_REVISION) {
-               ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unknown _TSD:revision\n"));
+               printk(KERN_ERR PREFIX "Unknown _TSD:revision\n");
                result = -EFAULT;
                goto end;
        }
index f6f52c1a2abad88cecc73a41ea65c4bddfafc0ae..81d6095468f9a0f9d2a957c9f756eab4ccc23df0 100644 (file)
@@ -113,16 +113,16 @@ static int acpi_bus_hot_remove_device(void *context)
 
 
        if (acpi_bus_trim(device, 1)) {
-               ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
-                               "Removing device failed\n"));
+               printk(KERN_ERR PREFIX
+                               "Removing device failed\n");
                return -1;
        }
 
        /* power off device */
        status = acpi_evaluate_object(handle, "_PS3", NULL, NULL);
        if (ACPI_FAILURE(status) && status != AE_NOT_FOUND)
-               ACPI_DEBUG_PRINT((ACPI_DB_WARN,
-                               "Power-off device failed\n"));
+               printk(KERN_WARNING PREFIX
+                               "Power-off device failed\n");
 
        if (device->flags.lockable) {
                arg_list.count = 1;
@@ -477,7 +477,7 @@ static int acpi_device_register(struct acpi_device *device,
 
        result = acpi_device_setup_files(device);
        if(result)
-               ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error creating sysfs interface for device %s\n", device->dev.bus_id));
+               printk(KERN_ERR PREFIX "Error creating sysfs interface for device %s\n", device->dev.bus_id);
 
        device->removal_type = ACPI_BUS_REMOVAL_NORMAL;
        return 0;
index 91dec448b3edcd5055112a892f1c368433bc6281..3eefd6d029f904afc5f668fbb39a6dbf4666667d 100644 (file)
@@ -387,8 +387,8 @@ static ssize_t counter_set(struct kobject *kobj,
                goto end;
 
        if (!(all_counters[index].flags & ACPI_EVENT_VALID)) {
-               ACPI_DEBUG_PRINT((ACPI_DB_WARN,
-                       "Can not change Invalid GPE/Fixed Event status\n"));
+               printk(KERN_WARNING PREFIX
+                       "Can not change Invalid GPE/Fixed Event status\n");
                return -EINVAL;
        }
 
index 912703691d36306b0d2256ba345570cab139f688..263ec08a901188d37f2b90b7dbbbc729734e9f0d 100644 (file)
@@ -1213,8 +1213,8 @@ static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz)
                                  acpi_bus_private_data_handler,
                                  tz->thermal_zone);
        if (ACPI_FAILURE(status)) {
-               ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
-                               "Error attaching device data\n"));
+               printk(KERN_ERR PREFIX
+                               "Error attaching device data\n");
                return -ENODEV;
        }
 
index e8a51a1700f710ca45d7ceba5a22429f7d348fbe..4ae39ee8cdef283edad7b1cad95f2915d49efffd 100644 (file)
@@ -1530,8 +1530,8 @@ acpi_video_bus_get_one_device(struct acpi_device *device,
                                                     acpi_video_device_notify,
                                                     data);
                if (ACPI_FAILURE(status)) {
-                       ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
-                                         "Error installing notify handler\n"));
+                       printk(KERN_ERR PREFIX
+                                         "Error installing notify handler\n");
                        if(data->brightness)
                                kfree(data->brightness->levels);
                        kfree(data->brightness);
@@ -1745,8 +1745,8 @@ acpi_video_bus_get_devices(struct acpi_video_bus *video,
 
                status = acpi_video_bus_get_one_device(dev, video);
                if (ACPI_FAILURE(status)) {
-                       ACPI_DEBUG_PRINT((ACPI_DB_WARN,
-                                       "Cant attach device"));
+                       printk(KERN_WARNING PREFIX
+                                       "Cant attach device");
                        continue;
                }
        }
@@ -2003,8 +2003,8 @@ static int acpi_video_bus_add(struct acpi_device *device)
                                             ACPI_DEVICE_NOTIFY,
                                             acpi_video_bus_notify, video);
        if (ACPI_FAILURE(status)) {
-               ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
-                                 "Error installing notify handler\n"));
+               printk(KERN_ERR PREFIX
+                                 "Error installing notify handler\n");
                error = -ENODEV;
                goto err_stop_video;
        }