/* Get the range from the _CRS */
result = acpi_memory_get_device_resources(mem_device);
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;
return result;
}
*/
result = add_memory(mem_device->start_addr, mem_device->length);
if (result) {
- ACPI_ERROR((AE_INFO, "add_memory failed"));
+ printk(KERN_ERR PREFIX "add_memory failed\n");
mem_device->state = MEMORY_INVALID_STATE;
return result;
}
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"\nReceived DEVICE CHECK notification for device\n"));
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;
}
if (!acpi_memory_check_device(mem_device)) {
if (acpi_memory_enable_device(mem_device))
- ACPI_ERROR((AE_INFO,
- "Cannot enable memory device"));
+ printk(KERN_ERR PREFIX
+ "Cannot enable memory device\n");
}
break;
case ACPI_NOTIFY_EJECT_REQUEST:
"\nReceived EJECT REQUEST notification for device\n"));
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;
}
mem_device = acpi_driver_data(device);
if (!mem_device) {
- ACPI_ERROR((AE_INFO, "Driver Data is NULL"));
+ printk(KERN_ERR PREFIX "Driver Data is NULL\n");
break;
}
* with generic sysfs driver
*/
if (acpi_memory_disable_device(mem_device))
- ACPI_ERROR((AE_INFO,
- "Disable memory device\n"));
+ printk(KERN_ERR PREFIX
+ "Disable memory device\n");
/*
* TBD: Invoke acpi_bus_remove to cleanup data structures
*/
sprintf(acpi_device_class(device), "%s/%s",
ACPI_BUTTON_CLASS, ACPI_BUTTON_SUBCLASS_LID);
} else {
- ACPI_ERROR((AE_INFO, "Unsupported hid [%s]",
- acpi_device_hid(device)));
+ printk(KERN_ERR PREFIX "Unsupported hid [%s]\n",
+ acpi_device_hid(device));
result = -ENODEV;
goto end;
}
ACPI_FUNCTION_TRACE("acpi_container_add");
if (!device) {
- ACPI_ERROR((AE_INFO, "device is NULL"));
+ printk(KERN_ERR PREFIX "device is NULL\n");
return_VALUE(-EINVAL);
}
acpi_evaluate_integer(ec->common.handle, "_GPE", NULL,
&ec->common.gpe_bit);
if (ACPI_FAILURE(status)) {
- ACPI_ERROR((AE_INFO, "Obtaining GPE bit assignment"));
+ printk(KERN_ERR PREFIX "Obtaining GPE bit assignment\n");
result = -ENODEV;
goto end;
}
acpi_ec_io_ports, ec);
if (ACPI_FAILURE(status)
|| 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);
}
result = acpi_bus_get_power(fan->handle, &state);
if (result) {
- ACPI_ERROR((AE_INFO, "Reading power state"));
+ printk(KERN_ERR PREFIX "Reading power state\n");
goto end;
}
if (copy_from_user(config_record, buffer, count)) {
kfree(config_record);
- ACPI_ERROR((AE_INFO, "Invalid data"));
+ printk(KERN_ERR PREFIX "Invalid data\n");
return_VALUE(-EINVAL);
}
config_record[count] = 0;
kfree(bus_method);
kfree(action_handle);
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);
}
tmp = get_hotkey_by_event(&global_hotkey_list,
internal_event_num);
if (!tmp)
- ACPI_ERROR((AE_INFO, "Invalid key"));
+ printk(KERN_ERR PREFIX "Invalid key\n");
else
memcpy(key, tmp, sizeof(union acpi_hotkey));
goto cont_cmd;
else
free_poll_hotkey_buffer(key);
kfree(key);
- ACPI_ERROR((AE_INFO, "Invalid hotkey"));
+ printk(KERN_ERR PREFIX "Invalid hotkey\n");
return_VALUE(-EINVAL);
}
else
free_poll_hotkey_buffer(key);
kfree(key);
- ACPI_ERROR((AE_INFO, "invalid key"));
+ printk(KERN_ERR PREFIX "invalid key\n");
return_VALUE(-EINVAL);
}
val->integer.value = out_obj.integer.value;
val->type = out_obj.type;
} else
- ACPI_ERROR((AE_INFO, "null val pointer"));
+ printk(KERN_ERR PREFIX "null val pointer\n");
return_VALUE((status == AE_OK)
&& (out_obj.type == ACPI_TYPE_INTEGER));
}
if (copy_from_user(arg, buffer, count)) {
kfree(arg);
- ACPI_ERROR((AE_INFO, "Invalid argument 2"));
+ printk(KERN_ERR PREFIX "Invalid argument 2\n");
return_VALUE(-EINVAL);
}
if (sscanf(arg, "%d:%d:%d:%d", &event, &method_type, &type, &value) !=
4) {
kfree(arg);
- ACPI_ERROR((AE_INFO, "Invalid argument 3"));
+ printk(KERN_ERR PREFIX "Invalid argument 3\n");
return_VALUE(-EINVAL);
}
kfree(arg);
dpc = (struct acpi_os_dpc *)context;
if (!dpc) {
- ACPI_ERROR((AE_INFO, "Invalid (NULL) context"));
+ printk(KERN_ERR PREFIX "Invalid (NULL) context\n");
return_VOID;
}
result = acpi_bus_get_device(handle, &device);
if (result) {
- ACPI_ERROR((AE_INFO,
- "Invalid ACPI Bus context for device %s",
- acpi_device_bid(device)));
+ printk(KERN_ERR PREFIX
+ "Invalid ACPI Bus context for device %s\n",
+ acpi_device_bid(device));
return_ACPI_STATUS(AE_NOT_EXIST);
}
goto end;
}
if (!data->dev->bus) {
- ACPI_ERROR((AE_INFO,
- "Device %02x:%02x:%02x.%02x has invalid 'bus' field",
+ printk(KERN_ERR PREFIX
+ "Device %02x:%02x:%02x.%02x has invalid 'bus' field\n",
data->id.segment, data->id.bus,
- data->id.device, data->id.function));
+ data->id.device, data->id.function);
result = -ENODEV;
goto end;
}
pin--;
if (!dev->bus) {
- ACPI_ERROR((AE_INFO, "Invalid (NULL) 'bus' field"));
+ printk(KERN_ERR PREFIX "Invalid (NULL) 'bus' field\n");
return_VALUE(-ENODEV);
}
break;
}
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);
}
}
break;
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:
return_ACPI_STATUS(AE_OK);
}
/* Query _STA, set link->device->status */
result = acpi_bus_get_status(link->device);
if (result) {
- ACPI_ERROR((AE_INFO, "Unable to read status"));
+ printk(KERN_ERR PREFIX "Unable to read status\n");
goto end;
}
}
if (acpi_strict && !irq) {
- ACPI_ERROR((AE_INFO, "_CRS returned 0"));
+ printk(KERN_ERR PREFIX "_CRS returned 0\n");
result = -ENODEV;
}
/* ignore resource_source, it's optional */
break;
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;
goto end;
/* Query _STA, set device->status */
result = acpi_bus_get_status(link->device);
if (result) {
- ACPI_ERROR((AE_INFO, "Unable to read status"));
+ printk(KERN_ERR PREFIX "Unable to read status\n");
goto end;
}
if (!link->device->status.enabled) {
link = list_entry(node, struct acpi_pci_link, node);
if (!link) {
- ACPI_ERROR((AE_INFO, "Invalid link context"));
+ printk(KERN_ERR PREFIX "Invalid link context\n");
continue;
}
/* Attempt to enable the link device at this IRQ. */
if (acpi_pci_link_set(link, irq)) {
- ACPI_ERROR((AE_INFO, "Unable to set IRQ for %s [%s]. "
- "Try pci=noacpi or acpi=off",
+ printk(KERN_ERR PREFIX "Unable to set IRQ for %s [%s]. "
+ "Try pci=noacpi or acpi=off\n",
acpi_device_name(link->device),
- acpi_device_bid(link->device)));
+ acpi_device_bid(link->device));
return_VALUE(-ENODEV);
} else {
acpi_irq_penalty[link->irq.active] += PIRQ_PENALTY_PCI_USING;
result = acpi_bus_get_device(handle, &device);
if (result) {
- ACPI_ERROR((AE_INFO, "Invalid link device"));
+ printk(KERN_ERR PREFIX "Invalid link device\n");
return_VALUE(-1);
}
link = (struct acpi_pci_link *)acpi_driver_data(device);
if (!link) {
- ACPI_ERROR((AE_INFO, "Invalid link context"));
+ printk(KERN_ERR PREFIX "Invalid link context\n");
return_VALUE(-1);
}
/* TBD: Support multiple index (IRQ) entries per Link Device */
if (index) {
- ACPI_ERROR((AE_INFO, "Invalid index %d", index));
+ printk(KERN_ERR PREFIX "Invalid index %d\n", index);
return_VALUE(-1);
}
if (!link->irq.active) {
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);
}
link->refcnt++;
result = acpi_bus_get_device(handle, &device);
if (result) {
- ACPI_ERROR((AE_INFO, "Invalid link device"));
+ printk(KERN_ERR PREFIX "Invalid link device\n");
return_VALUE(-1);
}
link = (struct acpi_pci_link *)acpi_driver_data(device);
if (!link) {
- ACPI_ERROR((AE_INFO, "Invalid link context"));
+ printk(KERN_ERR PREFIX "Invalid link context\n");
return_VALUE(-1);
}
mutex_lock(&acpi_link_lock);
if (!link->irq.initialized) {
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);
}
#ifdef FUTURE_USE
list_for_each(node, &acpi_link.entries) {
link = list_entry(node, struct acpi_pci_link, node);
if (!link) {
- ACPI_ERROR((AE_INFO, "Invalid link context"));
+ printk(KERN_ERR PREFIX "Invalid link context\n");
continue;
}
acpi_pci_link_resume(link);
int bus = 0;
acpi_status status;
- ACPI_ERROR((AE_INFO,
+ printk(KERN_ERR PREFIX
"Wrong _BBN value, reboot"
- " and use option 'pci=noacpi'"));
+ " and use option 'pci=noacpi'\n");
status = try_get_root_bridge_busnr(root->handle, &bus);
if (ACPI_FAILURE(status))
*/
root->bus = pci_acpi_scan_root(device, root->id.segment, root->id.bus);
if (!root->bus) {
- ACPI_ERROR((AE_INFO,
- "Bus %04x:%02x not present in PCI namespace",
- root->id.segment, root->id.bus));
+ printk(KERN_ERR PREFIX
+ "Bus %04x:%02x not present in PCI namespace\n",
+ root->id.segment, root->id.bus);
result = -ENODEV;
goto end;
}
for (i = 0; i < dev->wakeup.resources.count; i++) {
ret = acpi_power_on(dev->wakeup.resources.handles[i]);
if (ret) {
- ACPI_ERROR((AE_INFO, "Transition power state"));
+ printk(KERN_ERR PREFIX "Transition power state\n");
dev->wakeup.flags.valid = 0;
return_VALUE(-1);
}
/* Execute PSW */
status = acpi_evaluate_object(dev->handle, "_PSW", &arg_list, NULL);
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;
ret = -1;
}
/* Execute PSW */
status = acpi_evaluate_object(dev->handle, "_PSW", &arg_list, NULL);
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;
return_VALUE(-1);
}
for (i = 0; i < dev->wakeup.resources.count; i++) {
ret = acpi_power_off_device(dev->wakeup.resources.handles[i]);
if (ret) {
- ACPI_ERROR((AE_INFO, "Transition power state"));
+ printk(KERN_ERR PREFIX "Transition power state\n");
dev->wakeup.flags.valid = 0;
return_VALUE(-1);
}
*/
status = acpi_evaluate_object(pr->handle, NULL, NULL, &buffer);
if (ACPI_FAILURE(status)) {
- ACPI_ERROR((AE_INFO, "Evaluating processor object"));
+ printk(KERN_ERR PREFIX "Evaluating processor object\n");
return_VALUE(-ENODEV);
}
if (cpu_index == -1) {
if (ACPI_FAILURE
(acpi_processor_hotadd_init(pr->handle, &pr->id))) {
- ACPI_ERROR((AE_INFO,
- "Getting cpuindex for acpiid 0x%x",
- pr->acpi_id));
+ printk(KERN_ERR PREFIX
+ "Getting cpuindex for acpiid 0x%x\n",
+ pr->acpi_id);
return_VALUE(-ENODEV);
}
}
if (!object.processor.pblk_address)
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No PBLK (NULL address)\n"));
else if (object.processor.pblk_length != 6)
- ACPI_ERROR((AE_INFO, "Invalid PBLK length [%d]",
- object.processor.pblk_length));
+ printk(KERN_ERR PREFIX "Invalid PBLK length [%d]\n",
+ object.processor.pblk_length);
else {
pr->throttling.address = object.processor.pblk_address;
pr->throttling.duty_offset = acpi_fadt.duty_offset;
if (acpi_bus_get_device(handle, &device)) {
result = acpi_processor_device_add(handle, &device);
if (result)
- ACPI_ERROR((AE_INFO,
- "Unable to add the device"));
+ printk(KERN_ERR PREFIX
+ "Unable to add the device\n");
break;
}
pr = acpi_driver_data(device);
if (!pr) {
- ACPI_ERROR((AE_INFO, "Driver data is NULL"));
+ printk(KERN_ERR PREFIX "Driver data is NULL\n");
break;
}
if ((!result) && ((pr->id >= 0) && (pr->id < NR_CPUS))) {
kobject_uevent(&device->kobj, KOBJ_ONLINE);
} else {
- ACPI_ERROR((AE_INFO, "Device [%s] failed to start",
- acpi_device_bid(device)));
+ printk(KERN_ERR PREFIX "Device [%s] failed to start\n",
+ acpi_device_bid(device));
}
break;
case ACPI_NOTIFY_EJECT_REQUEST:
"received ACPI_NOTIFY_EJECT_REQUEST\n"));
if (acpi_bus_get_device(handle, &device)) {
- ACPI_ERROR((AE_INFO,
- "Device don't exist, dropping EJECT"));
+ printk(KERN_ERR PREFIX
+ "Device don't exist, dropping EJECT\n");
break;
}
pr = acpi_driver_data(device);
if (!pr) {
- ACPI_ERROR((AE_INFO,
- "Driver data is NULL, dropping EJECT"));
+ printk(KERN_ERR PREFIX
+ "Driver data is NULL, dropping EJECT\n");
return_VOID;
}
/* There must be at least 2 elements */
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;
goto end;
}
/* Validate number of power states. */
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;
goto end;
}
pct = (union acpi_object *)buffer.pointer;
if (!pct || (pct->type != ACPI_TYPE_PACKAGE)
|| (pct->package.count != 2)) {
- ACPI_ERROR((AE_INFO, "Invalid _PCT data"));
+ printk(KERN_ERR PREFIX "Invalid _PCT data\n");
result = -EFAULT;
goto end;
}
if ((obj.type != ACPI_TYPE_BUFFER)
|| (obj.buffer.length < sizeof(struct acpi_pct_register))
|| (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;
goto end;
}
if ((obj.type != ACPI_TYPE_BUFFER)
|| (obj.buffer.length < sizeof(struct acpi_pct_register))
|| (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;
goto end;
}
pss = (union acpi_object *)buffer.pointer;
if (!pss || (pss->type != ACPI_TYPE_PACKAGE)) {
- ACPI_ERROR((AE_INFO, "Invalid _PSS data"));
+ printk(KERN_ERR PREFIX "Invalid _PSS data\n");
result = -EFAULT;
goto end;
}
(u32) px->control, (u32) px->status));
if (!px->core_frequency) {
- ACPI_ERROR((AE_INFO,
- "Invalid _PSS data: freq is zero"));
+ printk(KERN_ERR PREFIX
+ "Invalid _PSS data: freq is zero\n");
result = -EFAULT;
kfree(pr->performance->states);
goto end;
end:
if (result)
- ACPI_ERROR((AE_INFO, "Unable to set limit"));
+ printk(KERN_ERR PREFIX "Unable to set limit\n");
return_VALUE(result);
}
result = acpi_processor_apply_limit(pr);
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",
pr->limit.thermal.px, pr->limit.thermal.tx));
limit_string[count] = '\0';
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);
}
if (pr->flags.throttling) {
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);
}
pr->limit.user.tx = tx;
device = kmalloc(sizeof(struct acpi_device), GFP_KERNEL);
if (!device) {
- ACPI_ERROR((AE_INFO, "Memory allocation error"));
+ printk(KERN_ERR PREFIX "Memory allocation error\n");
return_VALUE(-ENOMEM);
}
memset(device, 0, sizeof(struct acpi_device));
ACPI_FUNCTION_TRACE("acpi_thermal_check");
if (!tz) {
- ACPI_ERROR((AE_INFO, "Invalid (NULL) context"));
+ printk(KERN_ERR PREFIX "Invalid (NULL) context\n");
return_VOID;
}
acpi_os_vprintf(format, args);
acpi_os_printf(" [%X]\n", ACPI_CA_VERSION);
}
-EXPORT_SYMBOL(acpi_ut_error);
void ACPI_INTERNAL_VAR_XFACE
acpi_ut_exception(char *module_name,
*data = kmalloc(element->string.length + 1, GFP_KERNEL);
if (!data) {
- ACPI_ERROR((AE_INFO, "Memory allocation"));
+ printk(KERN_ERR PREFIX "Memory allocation\n");
return_VALUE(-ENOMEM);
}
memset(*data, 0, element->string.length + 1);
package = (union acpi_object *)buffer.pointer;
if ((buffer.length == 0) || !package) {
- ACPI_ERROR((AE_INFO, "No return object (len %X ptr %p)",
- (unsigned)buffer.length, package));
+ printk(KERN_ERR PREFIX "No return object (len %X ptr %p)\n",
+ (unsigned)buffer.length, package);
status = AE_BAD_DATA;
acpi_util_eval_error(handle, pathname, status);
goto end;
}
if (package->type != ACPI_TYPE_PACKAGE) {
- ACPI_ERROR((AE_INFO, "Expecting a [Package], found type %X",
- package->type));
+ printk(KERN_ERR PREFIX "Expecting a [Package], found type %X\n",
+ package->type);
status = AE_BAD_DATA;
acpi_util_eval_error(handle, pathname, status);
goto end;
}
if (!package->package.count) {
- ACPI_ERROR((AE_INFO, "[Package] has zero elements (%p)",
- package));
+ printk(KERN_ERR PREFIX "[Package] has zero elements (%p)\n",
+ package);
status = AE_BAD_DATA;
acpi_util_eval_error(handle, pathname, status);
goto end;
if (element->type != ACPI_TYPE_ANY) {
status = AE_BAD_DATA;
- ACPI_ERROR((AE_INFO,
- "Expecting a [Reference] package element, found type %X",
- element->type));
+ printk(KERN_ERR PREFIX
+ "Expecting a [Reference] package element, found type %X\n",
+ element->type);
acpi_util_eval_error(handle, pathname, status);
break;
}
return_VALUE(status);
obj = (union acpi_object *)buffer.pointer;
if (!obj || (obj->type != ACPI_TYPE_PACKAGE)) {
- ACPI_ERROR((AE_INFO, "Invalid _BCL data"));
+ printk(KERN_ERR PREFIX "Invalid _BCL data\n");
status = -EFAULT;
goto err;
}
if (obj && obj->type == ACPI_TYPE_BUFFER)
*edid = obj;
else {
- ACPI_ERROR((AE_INFO, "Invalid _DDC data"));
+ printk(KERN_ERR PREFIX "Invalid _DDC data\n");
status = -EFAULT;
kfree(obj);
}
o = (union acpi_object *)&obj->package.
elements[i];
if (o->type != ACPI_TYPE_INTEGER) {
- ACPI_ERROR((AE_INFO, "Invalid data"));
+ printk(KERN_ERR PREFIX "Invalid data\n");
continue;
}
br->levels[count] = (u32) o->integer.value;
obj = (union acpi_object *)&dod->package.elements[i];
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 =
ACPI_VIDEO_HEAD_INVALID;
}