ACPI: bus: Clean up printing messages
Replace all of the ACPI_DEBUG_PRINT() and ACPI_EXCEPTION() instances in bus.c with pr_debug() and pr_info(), respectively, drop the _COMPONENT and ACPI_MODULE_NAME() definitions that are not used any more and replace direct printk() invocations with the matching pr_*() calls (with a couple of exceptions where the log level is decreased). Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
c56fd5ead2
commit
ee98460b2f
@ -5,6 +5,8 @@
|
|||||||
* Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
|
* Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define pr_fmt(fmt) "ACPI: " fmt
|
||||||
|
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/ioport.h>
|
#include <linux/ioport.h>
|
||||||
@ -31,9 +33,6 @@
|
|||||||
|
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
|
|
||||||
#define _COMPONENT ACPI_BUS_COMPONENT
|
|
||||||
ACPI_MODULE_NAME("bus");
|
|
||||||
|
|
||||||
struct acpi_device *acpi_root;
|
struct acpi_device *acpi_root;
|
||||||
struct proc_dir_entry *acpi_root_dir;
|
struct proc_dir_entry *acpi_root_dir;
|
||||||
EXPORT_SYMBOL(acpi_root_dir);
|
EXPORT_SYMBOL(acpi_root_dir);
|
||||||
@ -47,8 +46,7 @@ static inline int set_copy_dsdt(const struct dmi_system_id *id)
|
|||||||
#else
|
#else
|
||||||
static int set_copy_dsdt(const struct dmi_system_id *id)
|
static int set_copy_dsdt(const struct dmi_system_id *id)
|
||||||
{
|
{
|
||||||
printk(KERN_NOTICE "%s detected - "
|
pr_notice("%s detected - force copy of DSDT to local memory\n", id->ident);
|
||||||
"force copy of DSDT to local memory\n", id->ident);
|
|
||||||
acpi_gbl_copy_dsdt_locally = 1;
|
acpi_gbl_copy_dsdt_locally = 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -116,13 +114,11 @@ int acpi_bus_get_status(struct acpi_device *device)
|
|||||||
acpi_set_device_status(device, sta);
|
acpi_set_device_status(device, sta);
|
||||||
|
|
||||||
if (device->status.functional && !device->status.present) {
|
if (device->status.functional && !device->status.present) {
|
||||||
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device [%s] status [%08x]: "
|
pr_debug("Device [%s] status [%08x]: functional but not present\n",
|
||||||
"functional but not present;\n",
|
device->pnp.bus_id, (u32)sta);
|
||||||
device->pnp.bus_id, (u32)sta));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device [%s] status [%08x]\n",
|
pr_debug("Device [%s] status [%08x]\n", device->pnp.bus_id, (u32)sta);
|
||||||
device->pnp.bus_id, (u32)sta));
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(acpi_bus_get_status);
|
EXPORT_SYMBOL(acpi_bus_get_status);
|
||||||
@ -915,9 +911,9 @@ static int acpi_device_probe(struct device *dev)
|
|||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
acpi_dev->driver = acpi_drv;
|
acpi_dev->driver = acpi_drv;
|
||||||
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
|
|
||||||
"Driver [%s] successfully bound to device [%s]\n",
|
pr_debug("Driver [%s] successfully bound to device [%s]\n",
|
||||||
acpi_drv->name, acpi_dev->pnp.bus_id));
|
acpi_drv->name, acpi_dev->pnp.bus_id);
|
||||||
|
|
||||||
if (acpi_drv->ops.notify) {
|
if (acpi_drv->ops.notify) {
|
||||||
ret = acpi_device_install_notify_handler(acpi_dev);
|
ret = acpi_device_install_notify_handler(acpi_dev);
|
||||||
@ -931,8 +927,9 @@ static int acpi_device_probe(struct device *dev)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found driver [%s] for device [%s]\n",
|
pr_debug("Found driver [%s] for device [%s]\n", acpi_drv->name,
|
||||||
acpi_drv->name, acpi_dev->pnp.bus_id));
|
acpi_dev->pnp.bus_id);
|
||||||
|
|
||||||
get_device(dev);
|
get_device(dev);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -995,15 +992,15 @@ static int __init acpi_bus_init_irq(void)
|
|||||||
message = "platform specific model";
|
message = "platform specific model";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
printk(KERN_WARNING PREFIX "Unknown interrupt routing model\n");
|
pr_info("Unknown interrupt routing model\n");
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
printk(KERN_INFO PREFIX "Using %s for interrupt routing\n", message);
|
pr_info("Using %s for interrupt routing\n", message);
|
||||||
|
|
||||||
status = acpi_execute_simple_method(NULL, "\\_PIC", acpi_irq_model);
|
status = acpi_execute_simple_method(NULL, "\\_PIC", acpi_irq_model);
|
||||||
if (ACPI_FAILURE(status) && (status != AE_NOT_FOUND)) {
|
if (ACPI_FAILURE(status) && (status != AE_NOT_FOUND)) {
|
||||||
ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PIC"));
|
pr_info("_PIC evaluation failed: %s\n", acpi_format_exception(status));
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1027,7 +1024,7 @@ void __init acpi_early_init(void)
|
|||||||
if (acpi_disabled)
|
if (acpi_disabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
printk(KERN_INFO PREFIX "Core revision %08x\n", ACPI_CA_VERSION);
|
pr_info("Core revision %08x\n", ACPI_CA_VERSION);
|
||||||
|
|
||||||
/* enable workarounds, unless strict ACPI spec. compliance */
|
/* enable workarounds, unless strict ACPI spec. compliance */
|
||||||
if (!acpi_strict)
|
if (!acpi_strict)
|
||||||
@ -1048,15 +1045,13 @@ void __init acpi_early_init(void)
|
|||||||
|
|
||||||
status = acpi_reallocate_root_table();
|
status = acpi_reallocate_root_table();
|
||||||
if (ACPI_FAILURE(status)) {
|
if (ACPI_FAILURE(status)) {
|
||||||
printk(KERN_ERR PREFIX
|
pr_err("Unable to reallocate ACPI tables\n");
|
||||||
"Unable to reallocate ACPI tables\n");
|
|
||||||
goto error0;
|
goto error0;
|
||||||
}
|
}
|
||||||
|
|
||||||
status = acpi_initialize_subsystem();
|
status = acpi_initialize_subsystem();
|
||||||
if (ACPI_FAILURE(status)) {
|
if (ACPI_FAILURE(status)) {
|
||||||
printk(KERN_ERR PREFIX
|
pr_err("Unable to initialize the ACPI Interpreter\n");
|
||||||
"Unable to initialize the ACPI Interpreter\n");
|
|
||||||
goto error0;
|
goto error0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1102,7 +1097,7 @@ void __init acpi_subsystem_init(void)
|
|||||||
|
|
||||||
status = acpi_enable_subsystem(~ACPI_NO_ACPI_ENABLE);
|
status = acpi_enable_subsystem(~ACPI_NO_ACPI_ENABLE);
|
||||||
if (ACPI_FAILURE(status)) {
|
if (ACPI_FAILURE(status)) {
|
||||||
printk(KERN_ERR PREFIX "Unable to enable ACPI\n");
|
pr_err("Unable to enable ACPI\n");
|
||||||
disable_acpi();
|
disable_acpi();
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
@ -1131,8 +1126,7 @@ static int __init acpi_bus_init(void)
|
|||||||
|
|
||||||
status = acpi_load_tables();
|
status = acpi_load_tables();
|
||||||
if (ACPI_FAILURE(status)) {
|
if (ACPI_FAILURE(status)) {
|
||||||
printk(KERN_ERR PREFIX
|
pr_err("Unable to load the System Description Tables\n");
|
||||||
"Unable to load the System Description Tables\n");
|
|
||||||
goto error1;
|
goto error1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1150,14 +1144,13 @@ static int __init acpi_bus_init(void)
|
|||||||
|
|
||||||
status = acpi_enable_subsystem(ACPI_NO_ACPI_ENABLE);
|
status = acpi_enable_subsystem(ACPI_NO_ACPI_ENABLE);
|
||||||
if (ACPI_FAILURE(status)) {
|
if (ACPI_FAILURE(status)) {
|
||||||
printk(KERN_ERR PREFIX
|
pr_err("Unable to start the ACPI Interpreter\n");
|
||||||
"Unable to start the ACPI Interpreter\n");
|
|
||||||
goto error1;
|
goto error1;
|
||||||
}
|
}
|
||||||
|
|
||||||
status = acpi_initialize_objects(ACPI_FULL_INITIALIZATION);
|
status = acpi_initialize_objects(ACPI_FULL_INITIALIZATION);
|
||||||
if (ACPI_FAILURE(status)) {
|
if (ACPI_FAILURE(status)) {
|
||||||
printk(KERN_ERR PREFIX "Unable to initialize ACPI objects\n");
|
pr_err("Unable to initialize ACPI objects\n");
|
||||||
goto error1;
|
goto error1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1186,7 +1179,7 @@ static int __init acpi_bus_init(void)
|
|||||||
*/
|
*/
|
||||||
acpi_ec_dsdt_probe();
|
acpi_ec_dsdt_probe();
|
||||||
|
|
||||||
printk(KERN_INFO PREFIX "Interpreter enabled\n");
|
pr_info("Interpreter enabled\n");
|
||||||
|
|
||||||
/* Initialize sleep structures */
|
/* Initialize sleep structures */
|
||||||
acpi_sleep_init();
|
acpi_sleep_init();
|
||||||
@ -1205,8 +1198,7 @@ static int __init acpi_bus_init(void)
|
|||||||
acpi_install_notify_handler(ACPI_ROOT_OBJECT, ACPI_SYSTEM_NOTIFY,
|
acpi_install_notify_handler(ACPI_ROOT_OBJECT, ACPI_SYSTEM_NOTIFY,
|
||||||
&acpi_bus_notify, NULL);
|
&acpi_bus_notify, NULL);
|
||||||
if (ACPI_FAILURE(status)) {
|
if (ACPI_FAILURE(status)) {
|
||||||
printk(KERN_ERR PREFIX
|
pr_err("Unable to register for system notifications\n");
|
||||||
"Unable to register for device notifications\n");
|
|
||||||
goto error1;
|
goto error1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1233,13 +1225,13 @@ static int __init acpi_init(void)
|
|||||||
int result;
|
int result;
|
||||||
|
|
||||||
if (acpi_disabled) {
|
if (acpi_disabled) {
|
||||||
printk(KERN_INFO PREFIX "Interpreter disabled.\n");
|
pr_info("Interpreter disabled.\n");
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
acpi_kobj = kobject_create_and_add("acpi", firmware_kobj);
|
acpi_kobj = kobject_create_and_add("acpi", firmware_kobj);
|
||||||
if (!acpi_kobj) {
|
if (!acpi_kobj) {
|
||||||
printk(KERN_WARNING "%s: kset create error\n", __func__);
|
pr_debug("%s: kset create error\n", __func__);
|
||||||
acpi_kobj = NULL;
|
acpi_kobj = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user