Skip to content

Commit

Permalink
ACPI: replace ACPI_DEBUG_PRINT((ACPI_DB_ERROR, ...) with printk
Browse files Browse the repository at this point in the history
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 6468463
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>
  • Loading branch information
Lin Ming authored and lenb committed Oct 23, 2008
1 parent 8bd108d commit 55ac9a0
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 35 deletions.
4 changes: 2 additions & 2 deletions drivers/acpi/acpi_memhotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
8 changes: 4 additions & 4 deletions drivers/acpi/cm_sbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions drivers/acpi/fan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
4 changes: 2 additions & 2 deletions drivers/acpi/osl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
10 changes: 5 additions & 5 deletions drivers/acpi/processor_perflib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down
10 changes: 5 additions & 5 deletions drivers/acpi/processor_throttling.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down
10 changes: 5 additions & 5 deletions drivers/acpi/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions drivers/acpi/system.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
4 changes: 2 additions & 2 deletions drivers/acpi/thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
12 changes: 6 additions & 6 deletions drivers/acpi/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}
}
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 55ac9a0

Please sign in to comment.