Commit 6468463a authored by Len Brown's avatar Len Brown

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

Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent cece9296
...@@ -187,7 +187,7 @@ static int acpi_memory_enable_device(struct acpi_memory_device *mem_device) ...@@ -187,7 +187,7 @@ static int acpi_memory_enable_device(struct acpi_memory_device *mem_device)
/* Get the range from the _CRS */ /* Get the range from the _CRS */
result = acpi_memory_get_device_resources(mem_device); result = acpi_memory_get_device_resources(mem_device);
if (result) { if (result) {
ACPI_ERROR((AE_INFO, "get_device_resources failed")); printk(KERN_ERR PREFIX "get_device_resources failed\n");
mem_device->state = MEMORY_INVALID_STATE; mem_device->state = MEMORY_INVALID_STATE;
return result; return result;
} }
...@@ -198,7 +198,7 @@ static int acpi_memory_enable_device(struct acpi_memory_device *mem_device) ...@@ -198,7 +198,7 @@ static int acpi_memory_enable_device(struct acpi_memory_device *mem_device)
*/ */
result = add_memory(mem_device->start_addr, mem_device->length); result = add_memory(mem_device->start_addr, mem_device->length);
if (result) { if (result) {
ACPI_ERROR((AE_INFO, "add_memory failed")); printk(KERN_ERR PREFIX "add_memory failed\n");
mem_device->state = MEMORY_INVALID_STATE; mem_device->state = MEMORY_INVALID_STATE;
return result; return result;
} }
...@@ -286,14 +286,14 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data) ...@@ -286,14 +286,14 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data)
ACPI_DEBUG_PRINT((ACPI_DB_INFO, ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"\nReceived DEVICE CHECK notification for device\n")); "\nReceived DEVICE CHECK notification for device\n"));
if (acpi_memory_get_device(handle, &mem_device)) { if (acpi_memory_get_device(handle, &mem_device)) {
ACPI_ERROR((AE_INFO, "Cannot find driver data")); printk(KERN_ERR PREFIX "Cannot find driver data\n");
return_VOID; return_VOID;
} }
if (!acpi_memory_check_device(mem_device)) { if (!acpi_memory_check_device(mem_device)) {
if (acpi_memory_enable_device(mem_device)) if (acpi_memory_enable_device(mem_device))
ACPI_ERROR((AE_INFO, printk(KERN_ERR PREFIX
"Cannot enable memory device")); "Cannot enable memory device\n");
} }
break; break;
case ACPI_NOTIFY_EJECT_REQUEST: case ACPI_NOTIFY_EJECT_REQUEST:
...@@ -301,12 +301,12 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data) ...@@ -301,12 +301,12 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data)
"\nReceived EJECT REQUEST notification for device\n")); "\nReceived EJECT REQUEST notification for device\n"));
if (acpi_bus_get_device(handle, &device)) { if (acpi_bus_get_device(handle, &device)) {
ACPI_ERROR((AE_INFO, "Device doesn't exist")); printk(KERN_ERR PREFIX "Device doesn't exist\n");
break; break;
} }
mem_device = acpi_driver_data(device); mem_device = acpi_driver_data(device);
if (!mem_device) { if (!mem_device) {
ACPI_ERROR((AE_INFO, "Driver Data is NULL")); printk(KERN_ERR PREFIX "Driver Data is NULL\n");
break; break;
} }
...@@ -317,8 +317,8 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data) ...@@ -317,8 +317,8 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data)
* with generic sysfs driver * with generic sysfs driver
*/ */
if (acpi_memory_disable_device(mem_device)) if (acpi_memory_disable_device(mem_device))
ACPI_ERROR((AE_INFO, printk(KERN_ERR PREFIX
"Disable memory device\n")); "Disable memory device\n");
/* /*
* TBD: Invoke acpi_bus_remove to cleanup data structures * TBD: Invoke acpi_bus_remove to cleanup data structures
*/ */
......
...@@ -345,8 +345,8 @@ static int acpi_button_add(struct acpi_device *device) ...@@ -345,8 +345,8 @@ static int acpi_button_add(struct acpi_device *device)
sprintf(acpi_device_class(device), "%s/%s", sprintf(acpi_device_class(device), "%s/%s",
ACPI_BUTTON_CLASS, ACPI_BUTTON_SUBCLASS_LID); ACPI_BUTTON_CLASS, ACPI_BUTTON_SUBCLASS_LID);
} else { } else {
ACPI_ERROR((AE_INFO, "Unsupported hid [%s]", printk(KERN_ERR PREFIX "Unsupported hid [%s]\n",
acpi_device_hid(device))); acpi_device_hid(device));
result = -ENODEV; result = -ENODEV;
goto end; goto end;
} }
......
...@@ -94,7 +94,7 @@ static int acpi_container_add(struct acpi_device *device) ...@@ -94,7 +94,7 @@ static int acpi_container_add(struct acpi_device *device)
ACPI_FUNCTION_TRACE("acpi_container_add"); ACPI_FUNCTION_TRACE("acpi_container_add");
if (!device) { if (!device) {
ACPI_ERROR((AE_INFO, "device is NULL")); printk(KERN_ERR PREFIX "device is NULL\n");
return_VALUE(-EINVAL); return_VALUE(-EINVAL);
} }
......
...@@ -1107,7 +1107,7 @@ static int acpi_ec_intr_add(struct acpi_device *device) ...@@ -1107,7 +1107,7 @@ static int acpi_ec_intr_add(struct acpi_device *device)
acpi_evaluate_integer(ec->common.handle, "_GPE", NULL, acpi_evaluate_integer(ec->common.handle, "_GPE", NULL,
&ec->common.gpe_bit); &ec->common.gpe_bit);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
ACPI_ERROR((AE_INFO, "Obtaining GPE bit assignment")); printk(KERN_ERR PREFIX "Obtaining GPE bit assignment\n");
result = -ENODEV; result = -ENODEV;
goto end; goto end;
} }
...@@ -1201,7 +1201,7 @@ static int acpi_ec_start(struct acpi_device *device) ...@@ -1201,7 +1201,7 @@ static int acpi_ec_start(struct acpi_device *device)
acpi_ec_io_ports, ec); acpi_ec_io_ports, ec);
if (ACPI_FAILURE(status) if (ACPI_FAILURE(status)
|| ec->common.command_addr.register_bit_width == 0) { || ec->common.command_addr.register_bit_width == 0) {
ACPI_ERROR((AE_INFO, "Error getting I/O port addresses")); printk(KERN_ERR PREFIX "Error getting I/O port addresses\n");
return_VALUE(-ENODEV); return_VALUE(-ENODEV);
} }
......
...@@ -203,7 +203,7 @@ static int acpi_fan_add(struct acpi_device *device) ...@@ -203,7 +203,7 @@ static int acpi_fan_add(struct acpi_device *device)
result = acpi_bus_get_power(fan->handle, &state); result = acpi_bus_get_power(fan->handle, &state);
if (result) { if (result) {
ACPI_ERROR((AE_INFO, "Reading power state")); printk(KERN_ERR PREFIX "Reading power state\n");
goto end; goto end;
} }
......
...@@ -768,7 +768,7 @@ static ssize_t hotkey_write_config(struct file *file, ...@@ -768,7 +768,7 @@ static ssize_t hotkey_write_config(struct file *file,
if (copy_from_user(config_record, buffer, count)) { if (copy_from_user(config_record, buffer, count)) {
kfree(config_record); kfree(config_record);
ACPI_ERROR((AE_INFO, "Invalid data")); printk(KERN_ERR PREFIX "Invalid data\n");
return_VALUE(-EINVAL); return_VALUE(-EINVAL);
} }
config_record[count] = 0; config_record[count] = 0;
...@@ -789,7 +789,7 @@ static ssize_t hotkey_write_config(struct file *file, ...@@ -789,7 +789,7 @@ static ssize_t hotkey_write_config(struct file *file,
kfree(bus_method); kfree(bus_method);
kfree(action_handle); kfree(action_handle);
kfree(method); kfree(method);
ACPI_ERROR((AE_INFO, "Invalid data format ret=%d", ret)); printk(KERN_ERR PREFIX "Invalid data format ret=%d\n", ret);
return_VALUE(-EINVAL); return_VALUE(-EINVAL);
} }
...@@ -802,7 +802,7 @@ static ssize_t hotkey_write_config(struct file *file, ...@@ -802,7 +802,7 @@ static ssize_t hotkey_write_config(struct file *file,
tmp = get_hotkey_by_event(&global_hotkey_list, tmp = get_hotkey_by_event(&global_hotkey_list,
internal_event_num); internal_event_num);
if (!tmp) if (!tmp)
ACPI_ERROR((AE_INFO, "Invalid key")); printk(KERN_ERR PREFIX "Invalid key\n");
else else
memcpy(key, tmp, sizeof(union acpi_hotkey)); memcpy(key, tmp, sizeof(union acpi_hotkey));
goto cont_cmd; goto cont_cmd;
...@@ -824,7 +824,7 @@ static ssize_t hotkey_write_config(struct file *file, ...@@ -824,7 +824,7 @@ static ssize_t hotkey_write_config(struct file *file,
else else
free_poll_hotkey_buffer(key); free_poll_hotkey_buffer(key);
kfree(key); kfree(key);
ACPI_ERROR((AE_INFO, "Invalid hotkey")); printk(KERN_ERR PREFIX "Invalid hotkey\n");
return_VALUE(-EINVAL); return_VALUE(-EINVAL);
} }
...@@ -858,7 +858,7 @@ static ssize_t hotkey_write_config(struct file *file, ...@@ -858,7 +858,7 @@ static ssize_t hotkey_write_config(struct file *file,
else else
free_poll_hotkey_buffer(key); free_poll_hotkey_buffer(key);
kfree(key); kfree(key);
ACPI_ERROR((AE_INFO, "invalid key")); printk(KERN_ERR PREFIX "invalid key\n");
return_VALUE(-EINVAL); return_VALUE(-EINVAL);
} }
...@@ -903,7 +903,7 @@ static int read_acpi_int(acpi_handle handle, const char *method, ...@@ -903,7 +903,7 @@ static int read_acpi_int(acpi_handle handle, const char *method,
val->integer.value = out_obj.integer.value; val->integer.value = out_obj.integer.value;
val->type = out_obj.type; val->type = out_obj.type;
} else } else
ACPI_ERROR((AE_INFO, "null val pointer")); printk(KERN_ERR PREFIX "null val pointer\n");
return_VALUE((status == AE_OK) return_VALUE((status == AE_OK)
&& (out_obj.type == ACPI_TYPE_INTEGER)); && (out_obj.type == ACPI_TYPE_INTEGER));
} }
...@@ -950,14 +950,14 @@ static ssize_t hotkey_execute_aml_method(struct file *file, ...@@ -950,14 +950,14 @@ static ssize_t hotkey_execute_aml_method(struct file *file,
if (copy_from_user(arg, buffer, count)) { if (copy_from_user(arg, buffer, count)) {
kfree(arg); kfree(arg);
ACPI_ERROR((AE_INFO, "Invalid argument 2")); printk(KERN_ERR PREFIX "Invalid argument 2\n");
return_VALUE(-EINVAL); return_VALUE(-EINVAL);
} }
if (sscanf(arg, "%d:%d:%d:%d", &event, &method_type, &type, &value) != if (sscanf(arg, "%d:%d:%d:%d", &event, &method_type, &type, &value) !=
4) { 4) {
kfree(arg); kfree(arg);
ACPI_ERROR((AE_INFO, "Invalid argument 3")); printk(KERN_ERR PREFIX "Invalid argument 3\n");
return_VALUE(-EINVAL); return_VALUE(-EINVAL);
} }
kfree(arg); kfree(arg);
......
...@@ -591,7 +591,7 @@ static void acpi_os_execute_deferred(void *context) ...@@ -591,7 +591,7 @@ static void acpi_os_execute_deferred(void *context)
dpc = (struct acpi_os_dpc *)context; dpc = (struct acpi_os_dpc *)context;
if (!dpc) { if (!dpc) {
ACPI_ERROR((AE_INFO, "Invalid (NULL) context")); printk(KERN_ERR PREFIX "Invalid (NULL) context\n");
return_VOID; return_VOID;
} }
......
...@@ -75,9 +75,9 @@ acpi_status acpi_get_pci_id(acpi_handle handle, struct acpi_pci_id *id) ...@@ -75,9 +75,9 @@ acpi_status acpi_get_pci_id(acpi_handle handle, struct acpi_pci_id *id)
result = acpi_bus_get_device(handle, &device); result = acpi_bus_get_device(handle, &device);
if (result) { if (result) {
ACPI_ERROR((AE_INFO, printk(KERN_ERR PREFIX
"Invalid ACPI Bus context for device %s", "Invalid ACPI Bus context for device %s\n",
acpi_device_bid(device))); acpi_device_bid(device));
return_ACPI_STATUS(AE_NOT_EXIST); return_ACPI_STATUS(AE_NOT_EXIST);
} }
...@@ -206,10 +206,10 @@ int acpi_pci_bind(struct acpi_device *device) ...@@ -206,10 +206,10 @@ int acpi_pci_bind(struct acpi_device *device)
goto end; goto end;
} }
if (!data->dev->bus) { if (!data->dev->bus) {
ACPI_ERROR((AE_INFO, printk(KERN_ERR PREFIX
"Device %02x:%02x:%02x.%02x has invalid 'bus' field", "Device %02x:%02x:%02x.%02x has invalid 'bus' field\n",
data->id.segment, data->id.bus, data->id.segment, data->id.bus,
data->id.device, data->id.function)); data->id.device, data->id.function);
result = -ENODEV; result = -ENODEV;
goto end; goto end;
} }
......
...@@ -420,7 +420,7 @@ int acpi_pci_irq_enable(struct pci_dev *dev) ...@@ -420,7 +420,7 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
pin--; pin--;
if (!dev->bus) { if (!dev->bus) {
ACPI_ERROR((AE_INFO, "Invalid (NULL) 'bus' field")); printk(KERN_ERR PREFIX "Invalid (NULL) 'bus' field\n");
return_VALUE(-ENODEV); return_VALUE(-ENODEV);
} }
......
...@@ -161,7 +161,7 @@ acpi_pci_link_check_possible(struct acpi_resource *resource, void *context) ...@@ -161,7 +161,7 @@ acpi_pci_link_check_possible(struct acpi_resource *resource, void *context)
break; break;
} }
default: default:
ACPI_ERROR((AE_INFO, "Resource is not an IRQ entry\n")); printk(KERN_ERR PREFIX "Resource is not an IRQ entry\n");
return_ACPI_STATUS(AE_OK); return_ACPI_STATUS(AE_OK);
} }
...@@ -232,7 +232,7 @@ acpi_pci_link_check_current(struct acpi_resource *resource, void *context) ...@@ -232,7 +232,7 @@ acpi_pci_link_check_current(struct acpi_resource *resource, void *context)
} }
break; break;
default: default:
ACPI_ERROR((AE_INFO, "Resource %d isn't an IRQ", resource->type)); printk(KERN_ERR PREFIX "Resource %d isn't an IRQ\n", resource->type);
case ACPI_RESOURCE_TYPE_END_TAG: case ACPI_RESOURCE_TYPE_END_TAG:
return_ACPI_STATUS(AE_OK); return_ACPI_STATUS(AE_OK);
} }
...@@ -264,7 +264,7 @@ static int acpi_pci_link_get_current(struct acpi_pci_link *link) ...@@ -264,7 +264,7 @@ static int acpi_pci_link_get_current(struct acpi_pci_link *link)
/* Query _STA, set link->device->status */ /* Query _STA, set link->device->status */
result = acpi_bus_get_status(link->device); result = acpi_bus_get_status(link->device);
if (result) { if (result) {
ACPI_ERROR((AE_INFO, "Unable to read status")); printk(KERN_ERR PREFIX "Unable to read status\n");
goto end; goto end;
} }
...@@ -287,7 +287,7 @@ static int acpi_pci_link_get_current(struct acpi_pci_link *link) ...@@ -287,7 +287,7 @@ static int acpi_pci_link_get_current(struct acpi_pci_link *link)
} }
if (acpi_strict && !irq) { if (acpi_strict && !irq) {
ACPI_ERROR((AE_INFO, "_CRS returned 0")); printk(KERN_ERR PREFIX "_CRS returned 0\n");
result = -ENODEV; result = -ENODEV;
} }
...@@ -357,7 +357,7 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq) ...@@ -357,7 +357,7 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq)
/* ignore resource_source, it's optional */ /* ignore resource_source, it's optional */
break; break;
default: default:
ACPI_ERROR((AE_INFO, "Invalid Resource_type %d\n", link->irq.resource_type)); printk(KERN_ERR PREFIX "Invalid Resource_type %d\n", link->irq.resource_type);
result = -EINVAL; result = -EINVAL;
goto end; goto end;
...@@ -377,7 +377,7 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq) ...@@ -377,7 +377,7 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq)
/* Query _STA, set device->status */ /* Query _STA, set device->status */
result = acpi_bus_get_status(link->device); result = acpi_bus_get_status(link->device);
if (result) { if (result) {
ACPI_ERROR((AE_INFO, "Unable to read status")); printk(KERN_ERR PREFIX "Unable to read status\n");
goto end; goto end;
} }
if (!link->device->status.enabled) { if (!link->device->status.enabled) {
...@@ -496,7 +496,7 @@ int __init acpi_irq_penalty_init(void) ...@@ -496,7 +496,7 @@ int __init acpi_irq_penalty_init(void)
link = list_entry(node, struct acpi_pci_link, node); link = list_entry(node, struct acpi_pci_link, node);
if (!link) { if (!link) {
ACPI_ERROR((AE_INFO, "Invalid link context")); printk(KERN_ERR PREFIX "Invalid link context\n");
continue; continue;
} }
...@@ -583,10 +583,10 @@ static int acpi_pci_link_allocate(struct acpi_pci_link *link) ...@@ -583,10 +583,10 @@ static int acpi_pci_link_allocate(struct acpi_pci_link *link)
/* Attempt to enable the link device at this IRQ. */ /* Attempt to enable the link device at this IRQ. */
if (acpi_pci_link_set(link, irq)) { if (acpi_pci_link_set(link, irq)) {
ACPI_ERROR((AE_INFO, "Unable to set IRQ for %s [%s]. " printk(KERN_ERR PREFIX "Unable to set IRQ for %s [%s]. "
"Try pci=noacpi or acpi=off", "Try pci=noacpi or acpi=off\n",
acpi_device_name(link->device), acpi_device_name(link->device),
acpi_device_bid(link->device))); acpi_device_bid(link->device));
return_VALUE(-ENODEV); return_VALUE(-ENODEV);
} else { } else {
acpi_irq_penalty[link->irq.active] += PIRQ_PENALTY_PCI_USING; acpi_irq_penalty[link->irq.active] += PIRQ_PENALTY_PCI_USING;
...@@ -619,19 +619,19 @@ acpi_pci_link_allocate_irq(acpi_handle handle, ...@@ -619,19 +619,19 @@ acpi_pci_link_allocate_irq(acpi_handle handle,
result = acpi_bus_get_device(handle, &device); result = acpi_bus_get_device(handle, &device);
if (result) { if (result) {
ACPI_ERROR((AE_INFO, "Invalid link device")); printk(KERN_ERR PREFIX "Invalid link device\n");
return_VALUE(-1); return_VALUE(-1);
} }
link = (struct acpi_pci_link *)acpi_driver_data(device); link = (struct acpi_pci_link *)acpi_driver_data(device);
if (!link) { if (!link) {
ACPI_ERROR((AE_INFO, "Invalid link context")); printk(KERN_ERR PREFIX "Invalid link context\n");
return_VALUE(-1); return_VALUE(-1);
} }
/* TBD: Support multiple index (IRQ) entries per Link Device */ /* TBD: Support multiple index (IRQ) entries per Link Device */
if (index) { if (index) {
ACPI_ERROR((AE_INFO, "Invalid index %d", index)); printk(KERN_ERR PREFIX "Invalid index %d\n", index);
return_VALUE(-1); return_VALUE(-1);
} }
...@@ -643,7 +643,7 @@ acpi_pci_link_allocate_irq(acpi_handle handle, ...@@ -643,7 +643,7 @@ acpi_pci_link_allocate_irq(acpi_handle handle,
if (!link->irq.active) { if (!link->irq.active) {
mutex_unlock(&acpi_link_lock); mutex_unlock(&acpi_link_lock);
ACPI_ERROR((AE_INFO, "Link active IRQ is 0!")); printk(KERN_ERR PREFIX "Link active IRQ is 0!\n");
return_VALUE(-1); return_VALUE(-1);
} }
link->refcnt++; link->refcnt++;
...@@ -675,20 +675,20 @@ int acpi_pci_link_free_irq(acpi_handle handle) ...@@ -675,20 +675,20 @@ int acpi_pci_link_free_irq(acpi_handle handle)
result = acpi_bus_get_device(handle, &device); result = acpi_bus_get_device(handle, &device);
if (result) { if (result) {
ACPI_ERROR((AE_INFO, "Invalid link device")); printk(KERN_ERR PREFIX "Invalid link device\n");
return_VALUE(-1); return_VALUE(-1);
} }
link = (struct acpi_pci_link *)acpi_driver_data(device); link = (struct acpi_pci_link *)acpi_driver_data(device);
if (!link) { if (!link) {
ACPI_ERROR((AE_INFO, "Invalid link context")); printk(KERN_ERR PREFIX "Invalid link context\n");
return_VALUE(-1); return_VALUE(-1);
} }
mutex_lock(&acpi_link_lock); mutex_lock(&acpi_link_lock);
if (!link->irq.initialized) { if (!link->irq.initialized) {
mutex_unlock(&acpi_link_lock); mutex_unlock(&acpi_link_lock);
ACPI_ERROR((AE_INFO, "Link isn't initialized")); printk(KERN_ERR PREFIX "Link isn't initialized\n");
return_VALUE(-1); return_VALUE(-1);
} }
#ifdef FUTURE_USE #ifdef FUTURE_USE
...@@ -813,7 +813,7 @@ static int irqrouter_resume(struct sys_device *dev) ...@@ -813,7 +813,7 @@ static int irqrouter_resume(struct sys_device *dev)
list_for_each(node, &acpi_link.entries) { list_for_each(node, &acpi_link.entries) {
link = list_entry(node, struct acpi_pci_link, node); link = list_entry(node, struct acpi_pci_link, node);
if (!link) { if (!link) {
ACPI_ERROR((AE_INFO, "Invalid link context")); printk(KERN_ERR PREFIX "Invalid link context\n");
continue; continue;
} }
acpi_pci_link_resume(link); acpi_pci_link_resume(link);
......
...@@ -231,9 +231,9 @@ static int acpi_pci_root_add(struct acpi_device *device) ...@@ -231,9 +231,9 @@ static int acpi_pci_root_add(struct acpi_device *device)
int bus = 0; int bus = 0;
acpi_status status; acpi_status status;
ACPI_ERROR((AE_INFO, printk(KERN_ERR PREFIX
"Wrong _BBN value, reboot" "Wrong _BBN value, reboot"
" and use option 'pci=noacpi'")); " and use option 'pci=noacpi'\n");
status = try_get_root_bridge_busnr(root->handle, &bus); status = try_get_root_bridge_busnr(root->handle, &bus);
if (ACPI_FAILURE(status)) if (ACPI_FAILURE(status))
...@@ -274,9 +274,9 @@ static int acpi_pci_root_add(struct acpi_device *device) ...@@ -274,9 +274,9 @@ static int acpi_pci_root_add(struct acpi_device *device)
*/ */
root->bus = pci_acpi_scan_root(device, root->id.segment, root->id.bus); root->bus = pci_acpi_scan_root(device, root->id.segment, root->id.bus);
if (!root->bus) { if (!root->bus) {
ACPI_ERROR((AE_INFO, printk(KERN_ERR PREFIX
"Bus %04x:%02x not present in PCI namespace", "Bus %04x:%02x not present in PCI namespace\n",
root->id.segment, root->id.bus)); root->id.segment, root->id.bus);
result = -ENODEV; result = -ENODEV;
goto end; goto end;
} }
......
...@@ -291,7 +291,7 @@ int acpi_enable_wakeup_device_power(struct acpi_device *dev) ...@@ -291,7 +291,7 @@ int acpi_enable_wakeup_device_power(struct acpi_device *dev)
for (i = 0; i < dev->wakeup.resources.count; i++) { for (i = 0; i < dev->wakeup.resources.count; i++) {
ret = acpi_power_on(dev->wakeup.resources.handles[i]); ret = acpi_power_on(dev->wakeup.resources.handles[i]);
if (ret) { if (ret) {
ACPI_ERROR((AE_INFO, "Transition power state")); printk(KERN_ERR PREFIX "Transition power state\n");
dev->wakeup.flags.valid = 0; dev->wakeup.flags.valid = 0;
return_VALUE(-1); return_VALUE(-1);
} }
...@@ -300,7 +300,7 @@ int acpi_enable_wakeup_device_power(struct acpi_device *dev) ...@@ -300,7 +300,7 @@ int acpi_enable_wakeup_device_power(struct acpi_device *dev)
/* Execute PSW */ /* Execute PSW */
status = acpi_evaluate_object(dev->handle, "_PSW", &arg_list, NULL); status = acpi_evaluate_object(dev->handle, "_PSW", &arg_list, NULL);
if (ACPI_FAILURE(status) && (status != AE_NOT_FOUND)) { if (ACPI_FAILURE(status) && (status != AE_NOT_FOUND)) {
ACPI_ERROR((AE_INFO, "Evaluate _PSW")); printk(KERN_ERR PREFIX "Evaluate _PSW\n");
dev->wakeup.flags.valid = 0; dev->wakeup.flags.valid = 0;
ret = -1; ret = -1;
} }
...@@ -330,7 +330,7 @@ int acpi_disable_wakeup_device_power(struct acpi_device *dev) ...@@ -330,7 +330,7 @@ int acpi_disable_wakeup_device_power(struct acpi_device *dev)
/* Execute PSW */ /* Execute PSW */
status = acpi_evaluate_object(dev->handle, "_PSW", &arg_list, NULL); status = acpi_evaluate_object(dev->handle, "_PSW", &arg_list, NULL);
if (ACPI_FAILURE(status) && (status != AE_NOT_FOUND)) { if (ACPI_FAILURE(status) && (status != AE_NOT_FOUND)) {
ACPI_ERROR((AE_INFO, "Evaluate _PSW")); printk(KERN_ERR PREFIX "Evaluate _PSW\n");
dev->wakeup.flags.valid = 0; dev->wakeup.flags.valid = 0;
return_VALUE(-1); return_VALUE(-1);
} }
...@@ -339,7 +339,7 @@ int acpi_disable_wakeup_device_power(struct acpi_device *dev) ...@@ -339,7 +339,7 @@ int acpi_disable_wakeup_device_power(struct acpi_device *dev)
for (i = 0; i < dev->wakeup.resources.count; i++) { for (i = 0; i < dev->wakeup.resources.count; i++) {
ret = acpi_power_off_device(dev->wakeup.resources.handles[i]); ret = acpi_power_off_device(dev->wakeup.resources.handles[i]);
if (ret) { if (ret) {
ACPI_ERROR((AE_INFO, "Transition power state")); printk(KERN_ERR PREFIX "Transition power state\n");
dev->wakeup.flags.valid = 0; dev->wakeup.flags.valid = 0;
return_VALUE(-1); return_VALUE(-1);
} }
......
...@@ -453,7 +453,7 @@ static int acpi_processor_get_info(struct acpi_processor *pr) ...@@ -453,7 +453,7 @@ static int acpi_processor_get_info(struct acpi_processor *pr)
*/ */
status = acpi_evaluate_object(pr->handle, NULL, NULL, &buffer); status = acpi_evaluate_object(pr->handle, NULL, NULL, &buffer);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
ACPI_ERROR((AE_INFO, "Evaluating processor object")); printk(KERN_ERR PREFIX "Evaluating processor object\n");
return_VALUE(-ENODEV); return_VALUE(-ENODEV);
} }
...@@ -483,9 +483,9 @@ static int acpi_processor_get_info(struct acpi_processor *pr) ...@@ -483,9 +483,9 @@ static int acpi_processor_get_info(struct acpi_processor *pr)
if (cpu_index == -1) { if (cpu_index == -1) {
if (ACPI_FAILURE if (ACPI_FAILURE
(acpi_processor_hotadd_init(pr->handle, &pr->id))) { (acpi_processor_hotadd_init(pr->handle, &pr->id))) {
ACPI_ERROR((AE_INFO, printk(KERN_ERR PREFIX
"Getting cpuindex for acpiid 0x%x", "Getting cpuindex for acpiid 0x%x\n",
pr->acpi_id)); pr->acpi_id);
return_VALUE(-ENODEV); return_VALUE(-ENODEV);
} }
} }
...@@ -496,8 +496,8 @@ static int acpi_processor_get_info(struct acpi_processor *pr) ...@@ -496,8 +496,8 @@ static int acpi_processor_get_info(struct acpi_processor *pr)
if (!object.processor.pblk_address) if (!object.processor.pblk_address)
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No PBLK (NULL address)\n")); ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No PBLK (NULL address)\n"));
else if (object.processor.pblk_length != 6) else if (object.processor.pblk_length != 6)
ACPI_ERROR((AE_INFO, "Invalid PBLK length [%d]", printk(KERN_ERR PREFIX "Invalid PBLK length [%d]\n",
object.processor.pblk_length)); object.processor.pblk_length);
else { else {
pr->throttling.address = object.processor.pblk_address; pr->throttling.address = object.processor.pblk_address;
pr->throttling.duty_offset = acpi_fadt.duty_offset; pr->throttling.duty_offset = acpi_fadt.duty_offset;
...@@ -751,14 +751,14 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data) ...@@ -751,14 +751,14 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data)
if (acpi_bus_get_device(handle, &device)) { if (acpi_bus_get_device(handle, &device)) {
result = acpi_processor_device_add(handle, &device); result = acpi_processor_device_add(handle, &device);
if (result) if (result)
ACPI_ERROR((AE_INFO, printk(KERN_ERR PREFIX
"Unable to add the device")); "Unable to add the device\n");
break; break;
} }
pr = acpi_driver_data(device); pr = acpi_driver_data(device);
if (!pr) { if (!pr) {
ACPI_ERROR((AE_INFO, "Driver data is NULL")); printk(KERN_ERR PREFIX "Driver data is NULL\n");
break; break;
} }
...@@ -771,8 +771,8 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data) ...@@ -771,8 +771,8 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data)
if ((!result) && ((pr->id >= 0) && (pr->id < NR_CPUS))) { if ((!result) && ((pr->id >= 0) && (pr->id < NR_CPUS))) {
kobject_uevent(&device->kobj, KOBJ_ONLINE); kobject_uevent(&device->kobj, KOBJ_ONLINE);
} else { } else {
ACPI_ERROR((AE_INFO, "Device [%s] failed to start", printk(KERN_ERR PREFIX "Device [%s] failed to start\n",
acpi_device_bid(device))); acpi_device_bid(device));
} }
break; break;
case ACPI_NOTIFY_EJECT_REQUEST: case ACPI_NOTIFY_EJECT_REQUEST:
...@@ -780,14 +780,14 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data) ...@@ -780,14 +780,14 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data)
"received ACPI_NOTIFY_EJECT_REQUEST\n")); "received ACPI_NOTIFY_EJECT_REQUEST\n"));
if (acpi_bus_get_device(handle, &device)) { if (acpi_bus_get_device(handle, &device)) {
ACPI_ERROR((AE_INFO, printk(KERN_ERR PREFIX
"Device don't exist, dropping EJECT")); "Device don't exist, dropping EJECT\n");
break; break;
} }
pr = acpi_driver_data(device); pr = acpi_driver_data(device);
if (!pr) { if (!pr) {
ACPI_ERROR((AE_INFO, printk(KERN_ERR PREFIX
"Driver data is NULL, dropping EJECT")); "Driver data is NULL, dropping EJECT\n");
return_VOID; return_VOID;
} }
......
...@@ -674,7 +674,7 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr) ...@@ -674,7 +674,7 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr)
/* There must be at least 2 elements */ /* There must be at least 2 elements */
if (!cst || (cst->type != ACPI_TYPE_PACKAGE) || cst->package.count < 2) { if (!cst || (cst->type != ACPI_TYPE_PACKAGE) || cst->package.count < 2) {
ACPI_ERROR((AE_INFO, "not enough elements in _CST")); printk(KERN_ERR PREFIX "not enough elements in _CST\n");
status = -EFAULT; status = -EFAULT;
goto end; goto end;
} }
...@@ -683,7 +683,7 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr) ...@@ -683,7 +683,7 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr)
/* Validate number of power states. */ /* Validate number of power states. */
if (count < 1 || count != cst->package.count - 1) { if (count < 1 || count != cst->package.count - 1) {
ACPI_ERROR((AE_INFO, "count given by _CST is not valid")); printk(KERN_ERR PREFIX "count given by _CST is not valid\n");
status = -EFAULT; status = -EFAULT;
goto end; goto end;
} }
......
...@@ -179,7 +179,7 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr) ...@@ -179,7 +179,7 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr)
pct = (union acpi_object *)buffer.pointer; pct = (union acpi_object *)buffer.pointer;
if (!pct || (pct->type != ACPI_TYPE_PACKAGE) if (!pct || (pct->type != ACPI_TYPE_PACKAGE)
|| (pct->package.count != 2)) { || (pct->package.count != 2)) {
ACPI_ERROR((AE_INFO, "Invalid _PCT data")); printk(KERN_ERR PREFIX "Invalid _PCT data\n");
result = -EFAULT; result = -EFAULT;
goto end; goto end;
} }
...@@ -193,7 +193,7 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr) ...@@ -193,7 +193,7 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr)
if ((obj.type != ACPI_TYPE_BUFFER) if ((obj.type != ACPI_TYPE_BUFFER)
|| (obj.buffer.length < sizeof(struct acpi_pct_register)) || (obj.buffer.length < sizeof(struct acpi_pct_register))
|| (obj.buffer.pointer == NULL)) { || (obj.buffer.pointer == NULL)) {
ACPI_ERROR((AE_INFO, "Invalid _PCT data (control_register)")); printk(KERN_ERR PREFIX "Invalid _PCT data (control_register)\n");
result = -EFAULT; result = -EFAULT;
goto end; goto end;
} }
...@@ -209,7 +209,7 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr) ...@@ -209,7 +209,7 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr)
if ((obj.type != ACPI_TYPE_BUFFER) if ((obj.type != ACPI_TYPE_BUFFER)
|| (obj.buffer.length < sizeof(struct acpi_pct_register)) || (obj.buffer.length < sizeof(struct acpi_pct_register))
|| (obj.buffer.pointer == NULL)) { || (obj.buffer.pointer == NULL)) {
ACPI_ERROR((AE_INFO, "Invalid _PCT data (status_register)")); printk(KERN_ERR PREFIX "Invalid _PCT data (status_register)\n");
result = -EFAULT; result = -EFAULT;
goto end; goto end;
} }
...@@ -243,7 +243,7 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr) ...@@ -243,7 +243,7 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr)
pss = (union acpi_object *)buffer.pointer; pss = (union acpi_object *)buffer.pointer;
if (!pss || (pss->type != ACPI_TYPE_PACKAGE)) { if (!pss || (pss->type != ACPI_TYPE_PACKAGE)) {
ACPI_ERROR((AE_INFO, "Invalid _PSS data")); printk(KERN_ERR PREFIX "Invalid _PSS data\n");
result = -EFAULT; result = -EFAULT;
goto end; goto end;
} }
...@@ -288,8 +288,8 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr) ...@@ -288,8 +288,8 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr)
(u32) px->control, (u32) px->status)); (u32) px->control, (u32) px->status));
if (!px->core_frequency) { if (!px->core_frequency) {
ACPI_ERROR((AE_INFO, printk(KERN_ERR PREFIX
"Invalid _PSS data: freq is zero")); "Invalid _PSS data: freq is zero\n");
result = -EFAULT; result = -EFAULT;
kfree(pr->performance->states); kfree(pr->performance->states);
goto end; goto end;
......
...@@ -82,7 +82,7 @@ static int acpi_processor_apply_limit(struct acpi_processor *pr) ...@@ -82,7 +82,7 @@ static int acpi_processor_apply_limit(struct acpi_processor *pr)
end: end:
if (result) if (result)
ACPI_ERROR((AE_INFO, "Unable to set limit")); printk(KERN_ERR PREFIX "Unable to set limit\n");
return_VALUE(result); return_VALUE(result);
} }
...@@ -289,7 +289,7 @@ int acpi_processor_set_thermal_limit(acpi_handle handle, int type) ...@@ -289,7 +289,7 @@ int acpi_processor_set_thermal_limit(acpi_handle handle, int type)
result = acpi_processor_apply_limit(pr); result = acpi_processor_apply_limit(pr);
if (result) if (result)
ACPI_ERROR((AE_INFO, "Unable to set thermal limit")); printk(KERN_ERR PREFIX "Unable to set thermal limit\n");
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Thermal limit now (P%d:T%d)\n", ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Thermal limit now (P%d:T%d)\n",
pr->limit.thermal.px, pr->limit.thermal.tx)); pr->limit.thermal.px, pr->limit.thermal.tx));
...@@ -371,13 +371,13 @@ static ssize_t acpi_processor_write_limit(struct file * file, ...@@ -371,13 +371,13 @@ static ssize_t acpi_processor_write_limit(struct file * file,
limit_string[count] = '\0'; limit_string[count] = '\0';
if (sscanf(limit_string, "%d:%d", &px, &tx) != 2) { if (sscanf(limit_string, "%d:%d", &px, &tx) != 2) {
ACPI_ERROR((AE_INFO, "Invalid data format")); printk(KERN_ERR PREFIX "Invalid data format\n");
return_VALUE(-EINVAL); return_VALUE(-EINVAL);
} }
if (pr->flags.throttling) { if (pr->flags.throttling) {
if ((tx < 0) || (tx > (pr->throttling.state_count - 1))) { if ((tx < 0) || (tx > (pr->throttling.state_count - 1))) {
ACPI_ERROR((AE_INFO, "Invalid tx")); printk(KERN_ERR PREFIX "Invalid tx\n");
return_VALUE(-EINVAL); return_VALUE(-EINVAL);
} }
pr->limit.user.tx = tx; pr->limit.user.tx = tx;
......
...@@ -969,7 +969,7 @@ acpi_add_single_object(struct acpi_device **child, ...@@ -969,7 +969,7 @@ acpi_add_single_object(struct acpi_device **child,
device = kmalloc(sizeof(struct acpi_device), GFP_KERNEL); device = kmalloc(sizeof(struct acpi_device), GFP_KERNEL);
if (!device) { if (!device) {
ACPI_ERROR((AE_INFO, "Memory allocation error")); printk(KERN_ERR PREFIX "Memory allocation error\n");
return_VALUE(-ENOMEM); return_VALUE(-ENOMEM);
} }
memset(device, 0, sizeof(struct acpi_device)); memset(device, 0, sizeof(struct acpi_device));
......
...@@ -698,7 +698,7 @@ static void acpi_thermal_check(void *data) ...@@ -698,7 +698,7 @@ static void acpi_thermal_check(void *data)
ACPI_FUNCTION_TRACE("acpi_thermal_check"); ACPI_FUNCTION_TRACE("acpi_thermal_check");
if (!tz) { if (!tz) {
ACPI_ERROR((AE_INFO, "Invalid (NULL) context")); printk(KERN_ERR PREFIX "Invalid (NULL) context\n");
return_VOID; return_VOID;
} }
......
...@@ -950,7 +950,6 @@ acpi_ut_error(char *module_name, u32 line_number, char *format, ...) ...@@ -950,7 +950,6 @@ acpi_ut_error(char *module_name, u32 line_number, char *format, ...)
acpi_os_vprintf(format, args); acpi_os_vprintf(format, args);
acpi_os_printf(" [%X]\n", ACPI_CA_VERSION); acpi_os_printf(" [%X]\n", ACPI_CA_VERSION);
} }
EXPORT_SYMBOL(acpi_ut_error);
void ACPI_INTERNAL_VAR_XFACE void ACPI_INTERNAL_VAR_XFACE
acpi_ut_exception(char *module_name, acpi_ut_exception(char *module_name,
......
...@@ -326,7 +326,7 @@ acpi_evaluate_string(acpi_handle handle, ...@@ -326,7 +326,7 @@ acpi_evaluate_string(acpi_handle handle,
*data = kmalloc(element->string.length + 1, GFP_KERNEL); *data = kmalloc(element->string.length + 1, GFP_KERNEL);
if (!data) { if (!data) {
ACPI_ERROR((AE_INFO, "Memory allocation")); printk(KERN_ERR PREFIX "Memory allocation\n");
return_VALUE(-ENOMEM); return_VALUE(-ENOMEM);
} }
memset(*data, 0, element->string.length + 1); memset(*data, 0, element->string.length + 1);
...@@ -368,22 +368,22 @@ acpi_evaluate_reference(acpi_handle handle, ...@@ -368,22 +368,22 @@ acpi_evaluate_reference(acpi_handle handle,
package = (union acpi_object *)buffer.pointer; package = (union acpi_object *)buffer.pointer;
if ((buffer.length == 0) || !package) { if ((buffer.length == 0) || !package) {
ACPI_ERROR((AE_INFO, "No return object (len %X ptr %p)", printk(KERN_ERR PREFIX "No return object (len %X ptr %p)\n",
(unsigned)buffer.length, package)); (unsigned)buffer.length, package);
status = AE_BAD_DATA; status = AE_BAD_DATA;
acpi_util_eval_error(handle, pathname, status); acpi_util_eval_error(handle, pathname, status);
goto end; goto end;
} }
if (package->type != ACPI_TYPE_PACKAGE) { if (package->type != ACPI_TYPE_PACKAGE) {
ACPI_ERROR((AE_INFO, "Expecting a [Package], found type %X", printk(KERN_ERR PREFIX "Expecting a [Package], found type %X\n",
package->type)); package->type);
status = AE_BAD_DATA; status = AE_BAD_DATA;
acpi_util_eval_error(handle, pathname, status); acpi_util_eval_error(handle, pathname, status);
goto end; goto end;
} }
if (!package->package.count) { if (!package->package.count) {
ACPI_ERROR((AE_INFO, "[Package] has zero elements (%p)", printk(KERN_ERR PREFIX "[Package] has zero elements (%p)\n",
package)); package);
status = AE_BAD_DATA; status = AE_BAD_DATA;
acpi_util_eval_error(handle, pathname, status); acpi_util_eval_error(handle, pathname, status);
goto end; goto end;
...@@ -402,9 +402,9 @@ acpi_evaluate_reference(acpi_handle handle, ...@@ -402,9 +402,9 @@ acpi_evaluate_reference(acpi_handle handle,
if (element->type != ACPI_TYPE_ANY) { if (element->type != ACPI_TYPE_ANY) {
status = AE_BAD_DATA; status = AE_BAD_DATA;
ACPI_ERROR((AE_INFO, printk(KERN_ERR PREFIX
"Expecting a [Reference] package element, found type %X", "Expecting a [Reference] package element, found type %X\n",
element->type)); element->type);
acpi_util_eval_error(handle, pathname, status); acpi_util_eval_error(handle, pathname, status);
break; break;
} }
......
...@@ -324,7 +324,7 @@ acpi_video_device_lcd_query_levels(struct acpi_video_device *device, ...@@ -324,7 +324,7 @@ acpi_video_device_lcd_query_levels(struct acpi_video_device *device,
return_VALUE(status); return_VALUE(status);
obj = (union acpi_object *)buffer.pointer; obj = (union acpi_object *)buffer.pointer;
if (!obj || (obj->type != ACPI_TYPE_PACKAGE)) { if (!obj || (obj->type != ACPI_TYPE_PACKAGE)) {
ACPI_ERROR((AE_INFO, "Invalid _BCL data")); printk(KERN_ERR PREFIX "Invalid _BCL data\n");
status = -EFAULT; status = -EFAULT;
goto err; goto err;
} }
...@@ -399,7 +399,7 @@ acpi_video_device_EDID(struct acpi_video_device *device, ...@@ -399,7 +399,7 @@ acpi_video_device_EDID(struct acpi_video_device *device,
if (obj && obj->type == ACPI_TYPE_BUFFER) if (obj && obj->type == ACPI_TYPE_BUFFER)
*edid = obj; *edid = obj;
else { else {
ACPI_ERROR((AE_INFO, "Invalid _DDC data")); printk(KERN_ERR PREFIX "Invalid _DDC data\n");
status = -EFAULT; status = -EFAULT;
kfree(obj); kfree(obj);
} }
...@@ -560,7 +560,7 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device) ...@@ -560,7 +560,7 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device)
o = (union acpi_object *)&obj->package. o = (union acpi_object *)&obj->package.
elements[i]; elements[i];
if (o->type != ACPI_TYPE_INTEGER) { if (o->type != ACPI_TYPE_INTEGER) {
ACPI_ERROR((AE_INFO, "Invalid data")); printk(KERN_ERR PREFIX "Invalid data\n");
continue; continue;
} }
br->levels[count] = (u32) o->integer.value; br->levels[count] = (u32) o->integer.value;
...@@ -1466,7 +1466,7 @@ static int acpi_video_device_enumerate(struct acpi_video_bus *video) ...@@ -1466,7 +1466,7 @@ static int acpi_video_device_enumerate(struct acpi_video_bus *video)
obj = (union acpi_object *)&dod->package.elements[i]; obj = (union acpi_object *)&dod->package.elements[i];
if (obj->type != ACPI_TYPE_INTEGER) { if (obj->type != ACPI_TYPE_INTEGER) {
ACPI_ERROR((AE_INFO, "Invalid _DOD data")); printk(KERN_ERR PREFIX "Invalid _DOD data\n");
active_device_list[i].value.int_val = active_device_list[i].value.int_val =
ACPI_VIDEO_HEAD_INVALID; ACPI_VIDEO_HEAD_INVALID;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment