ACPI: replace ACPI_DEBUG_PRINT((ACPI_DB_ERROR, ...) with printk

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 6468463abd
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>
This commit is contained in:
Lin Ming 2008-09-28 14:51:56 +08:00 committed by Len Brown
parent 8bd108d146
commit 55ac9a018f
10 changed files with 35 additions and 35 deletions

View File

@ -454,8 +454,8 @@ static int acpi_memory_device_start (struct acpi_device *device)
/* call add_memory func */ /* call add_memory func */
result = acpi_memory_enable_device(mem_device); result = acpi_memory_enable_device(mem_device);
if (result) if (result)
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, printk(KERN_ERR PREFIX
"Error in acpi_memory_enable_device\n")); "Error in acpi_memory_enable_device\n");
} }
return result; return result;
} }

View File

@ -52,8 +52,8 @@ struct proc_dir_entry *acpi_lock_ac_dir(void)
if (acpi_ac_dir) { if (acpi_ac_dir) {
lock_ac_dir_cnt++; lock_ac_dir_cnt++;
} else { } else {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, printk(KERN_ERR PREFIX
"Cannot create %s\n", ACPI_AC_CLASS)); "Cannot create %s\n", ACPI_AC_CLASS);
} }
mutex_unlock(&cm_sbs_mutex); mutex_unlock(&cm_sbs_mutex);
return acpi_ac_dir; return acpi_ac_dir;
@ -83,8 +83,8 @@ struct proc_dir_entry *acpi_lock_battery_dir(void)
if (acpi_battery_dir) { if (acpi_battery_dir) {
lock_battery_dir_cnt++; lock_battery_dir_cnt++;
} else { } else {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, printk(KERN_ERR PREFIX
"Cannot create %s\n", ACPI_BATTERY_CLASS)); "Cannot create %s\n", ACPI_BATTERY_CLASS);
} }
mutex_unlock(&cm_sbs_mutex); mutex_unlock(&cm_sbs_mutex);
return acpi_battery_dir; return acpi_battery_dir;

View File

@ -327,8 +327,8 @@ static int acpi_fan_resume(struct acpi_device *device)
result = acpi_bus_get_power(device->handle, &power_state); result = acpi_bus_get_power(device->handle, &power_state);
if (result) { if (result) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, printk(KERN_ERR PREFIX
"Error reading fan power state\n")); "Error reading fan power state\n");
return result; return result;
} }

View File

@ -729,8 +729,8 @@ acpi_status acpi_os_execute(acpi_execute_type type,
INIT_WORK(&dpc->work, acpi_os_execute_deferred); INIT_WORK(&dpc->work, acpi_os_execute_deferred);
queue = (type == OSL_NOTIFY_HANDLER) ? kacpi_notify_wq : kacpid_wq; queue = (type == OSL_NOTIFY_HANDLER) ? kacpi_notify_wq : kacpid_wq;
if (!queue_work(queue, &dpc->work)) { if (!queue_work(queue, &dpc->work)) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, printk(KERN_ERR PREFIX
"Call to queue_work() failed.\n")); "Call to queue_work() failed.\n");
status = AE_ERROR; status = AE_ERROR;
kfree(dpc); kfree(dpc);
} }

View File

@ -524,13 +524,13 @@ static int acpi_processor_get_psd(struct acpi_processor *pr)
psd = buffer.pointer; psd = buffer.pointer;
if (!psd || (psd->type != ACPI_TYPE_PACKAGE)) { 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; result = -EFAULT;
goto end; goto end;
} }
if (psd->package.count != 1) { 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; result = -EFAULT;
goto end; goto end;
} }
@ -543,19 +543,19 @@ static int acpi_processor_get_psd(struct acpi_processor *pr)
status = acpi_extract_package(&(psd->package.elements[0]), status = acpi_extract_package(&(psd->package.elements[0]),
&format, &state); &format, &state);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _PSD data\n")); printk(KERN_ERR PREFIX "Invalid _PSD data\n");
result = -EFAULT; result = -EFAULT;
goto end; goto end;
} }
if (pdomain->num_entries != ACPI_PSD_REV0_ENTRIES) { 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; result = -EFAULT;
goto end; goto end;
} }
if (pdomain->revision != ACPI_PSD_REV0_REVISION) { 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; result = -EFAULT;
goto end; goto end;
} }

View File

@ -528,13 +528,13 @@ static int acpi_processor_get_tsd(struct acpi_processor *pr)
tsd = buffer.pointer; tsd = buffer.pointer;
if (!tsd || (tsd->type != ACPI_TYPE_PACKAGE)) { 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; result = -EFAULT;
goto end; goto end;
} }
if (tsd->package.count != 1) { 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; result = -EFAULT;
goto end; goto end;
} }
@ -547,19 +547,19 @@ static int acpi_processor_get_tsd(struct acpi_processor *pr)
status = acpi_extract_package(&(tsd->package.elements[0]), status = acpi_extract_package(&(tsd->package.elements[0]),
&format, &state); &format, &state);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _TSD data\n")); printk(KERN_ERR PREFIX "Invalid _TSD data\n");
result = -EFAULT; result = -EFAULT;
goto end; goto end;
} }
if (pdomain->num_entries != ACPI_TSD_REV0_ENTRIES) { 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; result = -EFAULT;
goto end; goto end;
} }
if (pdomain->revision != ACPI_TSD_REV0_REVISION) { 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; result = -EFAULT;
goto end; goto end;
} }

View File

@ -113,16 +113,16 @@ static int acpi_bus_hot_remove_device(void *context)
if (acpi_bus_trim(device, 1)) { if (acpi_bus_trim(device, 1)) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, printk(KERN_ERR PREFIX
"Removing device failed\n")); "Removing device failed\n");
return -1; return -1;
} }
/* power off device */ /* power off device */
status = acpi_evaluate_object(handle, "_PS3", NULL, NULL); status = acpi_evaluate_object(handle, "_PS3", NULL, NULL);
if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) if (ACPI_FAILURE(status) && status != AE_NOT_FOUND)
ACPI_DEBUG_PRINT((ACPI_DB_WARN, printk(KERN_WARNING PREFIX
"Power-off device failed\n")); "Power-off device failed\n");
if (device->flags.lockable) { if (device->flags.lockable) {
arg_list.count = 1; arg_list.count = 1;
@ -477,7 +477,7 @@ static int acpi_device_register(struct acpi_device *device,
result = acpi_device_setup_files(device); result = acpi_device_setup_files(device);
if(result) 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; device->removal_type = ACPI_BUS_REMOVAL_NORMAL;
return 0; return 0;

View File

@ -387,8 +387,8 @@ static ssize_t counter_set(struct kobject *kobj,
goto end; goto end;
if (!(all_counters[index].flags & ACPI_EVENT_VALID)) { if (!(all_counters[index].flags & ACPI_EVENT_VALID)) {
ACPI_DEBUG_PRINT((ACPI_DB_WARN, printk(KERN_WARNING PREFIX
"Can not change Invalid GPE/Fixed Event status\n")); "Can not change Invalid GPE/Fixed Event status\n");
return -EINVAL; return -EINVAL;
} }

View File

@ -1213,8 +1213,8 @@ static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz)
acpi_bus_private_data_handler, acpi_bus_private_data_handler,
tz->thermal_zone); tz->thermal_zone);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, printk(KERN_ERR PREFIX
"Error attaching device data\n")); "Error attaching device data\n");
return -ENODEV; return -ENODEV;
} }

View File

@ -1530,8 +1530,8 @@ acpi_video_bus_get_one_device(struct acpi_device *device,
acpi_video_device_notify, acpi_video_device_notify,
data); data);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, printk(KERN_ERR PREFIX
"Error installing notify handler\n")); "Error installing notify handler\n");
if(data->brightness) if(data->brightness)
kfree(data->brightness->levels); kfree(data->brightness->levels);
kfree(data->brightness); 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); status = acpi_video_bus_get_one_device(dev, video);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
ACPI_DEBUG_PRINT((ACPI_DB_WARN, printk(KERN_WARNING PREFIX
"Cant attach device")); "Cant attach device");
continue; continue;
} }
} }
@ -2003,8 +2003,8 @@ static int acpi_video_bus_add(struct acpi_device *device)
ACPI_DEVICE_NOTIFY, ACPI_DEVICE_NOTIFY,
acpi_video_bus_notify, video); acpi_video_bus_notify, video);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, printk(KERN_ERR PREFIX
"Error installing notify handler\n")); "Error installing notify handler\n");
error = -ENODEV; error = -ENODEV;
goto err_stop_video; goto err_stop_video;
} }