Loading drivers/acpi/ac.c +2 −10 Original line number Diff line number Diff line Loading @@ -91,8 +91,7 @@ static int acpi_ac_get_state(struct acpi_ac *ac) status = acpi_evaluate_integer(ac->handle, "_PSR", NULL, &ac->state); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error reading AC Adapter state\n")); ACPI_EXCEPTION((AE_INFO, status, "Error reading AC Adapter state")); ac->state = ACPI_AC_STATUS_UNKNOWN; return_VALUE(-ENODEV); } Loading Loading @@ -159,9 +158,7 @@ static int acpi_ac_add_fs(struct acpi_device *device) entry = create_proc_entry(ACPI_AC_FILE_STATE, S_IRUGO, acpi_device_dir(device)); if (!entry) ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unable to create '%s' fs entry\n", ACPI_AC_FILE_STATE)); return_VALUE(-ENODEV); else { entry->proc_fops = &acpi_ac_fops; entry->data = acpi_driver_data(device); Loading Loading @@ -249,8 +246,6 @@ static int acpi_ac_add(struct acpi_device *device) ACPI_DEVICE_NOTIFY, acpi_ac_notify, ac); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error installing notify handler\n")); result = -ENODEV; goto end; } Loading Loading @@ -282,9 +277,6 @@ static int acpi_ac_remove(struct acpi_device *device, int type) status = acpi_remove_notify_handler(ac->handle, ACPI_DEVICE_NOTIFY, acpi_ac_notify); if (ACPI_FAILURE(status)) ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error removing notify handler\n")); acpi_ac_remove_fs(device); Loading drivers/acpi/acpi_memhotplug.c +26 −41 Original line number Diff line number Diff line Loading @@ -125,15 +125,14 @@ acpi_memory_get_device(acpi_handle handle, status = acpi_get_parent(handle, &phandle); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error in acpi_get_parent\n")); ACPI_EXCEPTION((AE_INFO, status, "Cannot find acpi parent")); return_VALUE(-EINVAL); } /* Get the parent device */ status = acpi_bus_get_device(phandle, &pdevice); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error in acpi_bus_get_device\n")); ACPI_EXCEPTION((AE_INFO, status, "Cannot get acpi bus device")); return_VALUE(-EINVAL); } Loading @@ -143,7 +142,7 @@ acpi_memory_get_device(acpi_handle handle, */ status = acpi_bus_add(&device, pdevice, handle, ACPI_BUS_TYPE_DEVICE); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error in acpi_bus_add\n")); ACPI_EXCEPTION((AE_INFO, status, "Cannot add acpi bus")); return_VALUE(-EINVAL); } Loading Loading @@ -188,8 +187,7 @@ static int acpi_memory_enable_device(struct acpi_memory_device *mem_device) /* Get the range from the _CRS */ result = acpi_memory_get_device_resources(mem_device); if (result) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "\nget_device_resources failed\n")); ACPI_ERROR((AE_INFO, "get_device_resources failed")); mem_device->state = MEMORY_INVALID_STATE; return result; } Loading @@ -200,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); if (result) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "\nadd_memory failed\n")); ACPI_ERROR((AE_INFO, "add_memory failed")); mem_device->state = MEMORY_INVALID_STATE; return result; } Loading @@ -226,7 +224,7 @@ static int acpi_memory_powerdown_device(struct acpi_memory_device *mem_device) "_EJ0", &arg_list, NULL); /* Return on _EJ0 failure */ if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "_EJ0 failed.\n")); ACPI_EXCEPTION((AE_INFO, status, "_EJ0 failed")); return_VALUE(-ENODEV); } Loading Loading @@ -256,16 +254,12 @@ static int acpi_memory_disable_device(struct acpi_memory_device *mem_device) * Note: Assume that this function returns zero on success */ result = remove_memory(start, len); if (result) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Hot-Remove failed.\n")); if (result) return_VALUE(result); } /* Power-off and eject the device */ result = acpi_memory_powerdown_device(mem_device); if (result) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Device Power Down failed.\n")); /* Set the status of the device to invalid */ mem_device->state = MEMORY_INVALID_STATE; return result; Loading @@ -292,15 +286,14 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data) ACPI_DEBUG_PRINT((ACPI_DB_INFO, "\nReceived DEVICE CHECK notification for device\n")); if (acpi_memory_get_device(handle, &mem_device)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error in finding driver data\n")); ACPI_ERROR((AE_INFO, "Cannot find driver data")); return_VOID; } if (!acpi_memory_check_device(mem_device)) { if (acpi_memory_enable_device(mem_device)) ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error in acpi_memory_enable_device\n")); ACPI_ERROR((AE_INFO, "Cannot enable memory device")); } break; case ACPI_NOTIFY_EJECT_REQUEST: Loading @@ -308,14 +301,12 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data) "\nReceived EJECT REQUEST notification for device\n")); if (acpi_bus_get_device(handle, &device)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Device doesn't exist\n")); ACPI_ERROR((AE_INFO, "Device doesn't exist")); break; } mem_device = acpi_driver_data(device); if (!mem_device) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Driver Data is NULL\n")); ACPI_ERROR((AE_INFO, "Driver Data is NULL")); break; } Loading @@ -326,8 +317,8 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data) * with generic sysfs driver */ if (acpi_memory_disable_device(mem_device)) ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error in acpi_memory_disable_device\n")); ACPI_ERROR((AE_INFO, "Disable memory device\n")); /* * TBD: Invoke acpi_bus_remove to cleanup data structures */ Loading Loading @@ -405,7 +396,7 @@ static acpi_status is_memory_device(acpi_handle handle) status = acpi_get_object_info(handle, &buffer); if (ACPI_FAILURE(status)) return_ACPI_STATUS(AE_ERROR); return_ACPI_STATUS(status); info = buffer.pointer; if (!(info->valid & ACPI_VALID_HID)) { Loading @@ -431,18 +422,15 @@ acpi_memory_register_notify_handler(acpi_handle handle, ACPI_FUNCTION_TRACE("acpi_memory_register_notify_handler"); status = is_memory_device(handle); if (ACPI_FAILURE(status)) return_ACPI_STATUS(AE_OK); /* continue */ status = acpi_install_notify_handler(handle, ACPI_SYSTEM_NOTIFY, acpi_memory_device_notify, NULL); if (ACPI_FAILURE(status)){ ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error installing notify handler\n")); ACPI_EXCEPTION((AE_INFO, status, "handle is no memory device")); return_ACPI_STATUS(AE_OK); /* continue */ } return_ACPI_STATUS(status); status = acpi_install_notify_handler(handle, ACPI_SYSTEM_NOTIFY, acpi_memory_device_notify, NULL); /* continue */ return_ACPI_STATUS(AE_OK); } static acpi_status Loading @@ -454,19 +442,16 @@ acpi_memory_deregister_notify_handler(acpi_handle handle, ACPI_FUNCTION_TRACE("acpi_memory_deregister_notify_handler"); status = is_memory_device(handle); if (ACPI_FAILURE(status)) if (ACPI_FAILURE(status)){ ACPI_EXCEPTION((AE_INFO, status, "handle is no memory device")); return_ACPI_STATUS(AE_OK); /* continue */ } status = acpi_remove_notify_handler(handle, ACPI_SYSTEM_NOTIFY, acpi_memory_device_notify); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error removing notify handler\n")); return_ACPI_STATUS(AE_OK); /* continue */ } return_ACPI_STATUS(status); return_ACPI_STATUS(AE_OK); /* continue */ } static int __init acpi_memory_device_init(void) Loading @@ -487,7 +472,7 @@ static int __init acpi_memory_device_init(void) NULL, NULL); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "walk_namespace failed\n")); ACPI_EXCEPTION((AE_INFO, status, "walk_namespace failed")); acpi_bus_unregister_driver(&acpi_memory_device_driver); return_VALUE(-ENODEV); } Loading @@ -511,7 +496,7 @@ static void __exit acpi_memory_device_exit(void) NULL, NULL); if (ACPI_FAILURE(status)) ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "walk_namespace failed\n")); ACPI_EXCEPTION((AE_INFO, status, "walk_namespace failed")); acpi_bus_unregister_driver(&acpi_memory_device_driver); Loading drivers/acpi/battery.c +9 −22 Original line number Diff line number Diff line Loading @@ -141,7 +141,7 @@ acpi_battery_get_info(struct acpi_battery *battery, status = acpi_evaluate_object(battery->handle, "_BIF", NULL, &buffer); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _BIF\n")); ACPI_EXCEPTION((AE_INFO, status, "Evaluating _BIF")); return_VALUE(-ENODEV); } Loading @@ -151,7 +151,7 @@ acpi_battery_get_info(struct acpi_battery *battery, status = acpi_extract_package(package, &format, &data); if (status != AE_BUFFER_OVERFLOW) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error extracting _BIF\n")); ACPI_EXCEPTION((AE_INFO, status, "Extracting _BIF")); result = -ENODEV; goto end; } Loading @@ -165,7 +165,7 @@ acpi_battery_get_info(struct acpi_battery *battery, status = acpi_extract_package(package, &format, &data); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error extracting _BIF\n")); ACPI_EXCEPTION((AE_INFO, status, "Extracting _BIF")); kfree(data.pointer); result = -ENODEV; goto end; Loading Loading @@ -202,7 +202,7 @@ acpi_battery_get_status(struct acpi_battery *battery, status = acpi_evaluate_object(battery->handle, "_BST", NULL, &buffer); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _BST\n")); ACPI_EXCEPTION((AE_INFO, status, "Evaluating _BST")); return_VALUE(-ENODEV); } Loading @@ -212,7 +212,7 @@ acpi_battery_get_status(struct acpi_battery *battery, status = acpi_extract_package(package, &format, &data); if (status != AE_BUFFER_OVERFLOW) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error extracting _BST\n")); ACPI_EXCEPTION((AE_INFO, status, "Extracting _BST")); result = -ENODEV; goto end; } Loading @@ -226,7 +226,7 @@ acpi_battery_get_status(struct acpi_battery *battery, status = acpi_extract_package(package, &format, &data); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error extracting _BST\n")); ACPI_EXCEPTION((AE_INFO, status, "Extracting _BST")); kfree(data.pointer); result = -ENODEV; goto end; Loading Loading @@ -458,8 +458,6 @@ static int acpi_battery_read_state(struct seq_file *seq, void *offset) if ((bst->state & 0x01) && (bst->state & 0x02)) { seq_printf(seq, "charging state: charging/discharging\n"); ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Battery Charging and Discharging?\n")); } else if (bst->state & 0x01) seq_printf(seq, "charging state: discharging\n"); else if (bst->state & 0x02) Loading Loading @@ -609,9 +607,7 @@ static int acpi_battery_add_fs(struct acpi_device *device) entry = create_proc_entry(ACPI_BATTERY_FILE_INFO, S_IRUGO, acpi_device_dir(device)); if (!entry) ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unable to create '%s' fs entry\n", ACPI_BATTERY_FILE_INFO)); return_VALUE(-ENODEV); else { entry->proc_fops = &acpi_battery_info_ops; entry->data = acpi_driver_data(device); Loading @@ -622,9 +618,7 @@ static int acpi_battery_add_fs(struct acpi_device *device) entry = create_proc_entry(ACPI_BATTERY_FILE_STATUS, S_IRUGO, acpi_device_dir(device)); if (!entry) ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unable to create '%s' fs entry\n", ACPI_BATTERY_FILE_STATUS)); return_VALUE(-ENODEV); else { entry->proc_fops = &acpi_battery_state_ops; entry->data = acpi_driver_data(device); Loading @@ -636,9 +630,7 @@ static int acpi_battery_add_fs(struct acpi_device *device) S_IFREG | S_IRUGO | S_IWUSR, acpi_device_dir(device)); if (!entry) ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unable to create '%s' fs entry\n", ACPI_BATTERY_FILE_ALARM)); return_VALUE(-ENODEV); else { entry->proc_fops = &acpi_battery_alarm_ops; entry->data = acpi_driver_data(device); Loading Loading @@ -732,8 +724,6 @@ static int acpi_battery_add(struct acpi_device *device) ACPI_DEVICE_NOTIFY, acpi_battery_notify, battery); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error installing notify handler\n")); result = -ENODEV; goto end; } Loading Loading @@ -766,9 +756,6 @@ static int acpi_battery_remove(struct acpi_device *device, int type) status = acpi_remove_notify_handler(battery->handle, ACPI_DEVICE_NOTIFY, acpi_battery_notify); if (ACPI_FAILURE(status)) ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error removing notify handler\n")); acpi_battery_remove_fs(device); Loading drivers/acpi/bus.c +10 −12 Original line number Diff line number Diff line Loading @@ -69,8 +69,7 @@ int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device) status = acpi_get_data(handle, acpi_bus_data_handler, (void **)device); if (ACPI_FAILURE(status) || !*device) { ACPI_DEBUG_PRINT((ACPI_DB_WARN, "No context for object [%p]\n", handle)); ACPI_EXCEPTION((AE_INFO, status, "No context for object [%p]", handle)); return_VALUE(-ENODEV); } Loading Loading @@ -197,8 +196,7 @@ int acpi_bus_set_power(acpi_handle handle, int state) /* Make sure this is a valid target state */ if (!device->flags.power_manageable) { ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Device is not power manageable\n")); ACPI_INFO((AE_INFO, "Device is not power manageable")); return_VALUE(-ENODEV); } /* Loading @@ -215,13 +213,13 @@ int acpi_bus_set_power(acpi_handle handle, int state) } } if (!device->power.states[state].flags.valid) { ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Device does not support D%d\n", state)); ACPI_WARNING((AE_INFO, "Device does not support D%d", state)); return_VALUE(-ENODEV); } if (device->parent && (state < device->parent->power.state)) { ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Cannot set device to a higher-powered state than parent\n")); ACPI_WARNING((AE_INFO, "Cannot set device to a higher-powered" " state than parent")); return_VALUE(-ENODEV); } Loading Loading @@ -264,8 +262,8 @@ int acpi_bus_set_power(acpi_handle handle, int state) end: if (result) ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Error transitioning device [%s] to D%d\n", ACPI_WARNING((AE_INFO, "Transitioning device [%s] to D%d", device->pnp.bus_id, state)); else ACPI_DEBUG_PRINT((ACPI_DB_INFO, Loading Loading @@ -581,7 +579,7 @@ static int __init acpi_bus_init_irq(void) status = acpi_evaluate_object(NULL, "\\_PIC", &arg_list, NULL); if (ACPI_FAILURE(status) && (status != AE_NOT_FOUND)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _PIC\n")); ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PIC")); return_VALUE(-ENODEV); } Loading drivers/acpi/button.c +4 −14 Original line number Diff line number Diff line Loading @@ -207,9 +207,7 @@ static int acpi_button_add_fs(struct acpi_device *device) entry = create_proc_entry(ACPI_BUTTON_FILE_INFO, S_IRUGO, acpi_device_dir(device)); if (!entry) ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unable to create '%s' fs entry\n", ACPI_BUTTON_FILE_INFO)); return_VALUE(-ENODEV); else { entry->proc_fops = &acpi_button_info_fops; entry->data = acpi_driver_data(device); Loading @@ -221,9 +219,7 @@ static int acpi_button_add_fs(struct acpi_device *device) entry = create_proc_entry(ACPI_BUTTON_FILE_STATE, S_IRUGO, acpi_device_dir(device)); if (!entry) ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unable to create '%s' fs entry\n", ACPI_BUTTON_FILE_INFO)); return -ENODEV; else { entry->proc_fops = &acpi_button_state_fops; entry->data = acpi_driver_data(device); Loading Loading @@ -349,7 +345,7 @@ static int acpi_button_add(struct acpi_device *device) sprintf(acpi_device_class(device), "%s/%s", ACPI_BUTTON_CLASS, ACPI_BUTTON_SUBCLASS_LID); } else { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unsupported hid [%s]\n", ACPI_ERROR((AE_INFO, "Unsupported hid [%s]", acpi_device_hid(device))); result = -ENODEV; goto end; Loading Loading @@ -381,8 +377,6 @@ static int acpi_button_add(struct acpi_device *device) } if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error installing notify handler\n")); result = -ENODEV; goto end; } Loading Loading @@ -440,10 +434,6 @@ static int acpi_button_remove(struct acpi_device *device, int type) break; } if (ACPI_FAILURE(status)) ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error removing notify handler\n")); acpi_button_remove_fs(device); kfree(button); Loading Loading
drivers/acpi/ac.c +2 −10 Original line number Diff line number Diff line Loading @@ -91,8 +91,7 @@ static int acpi_ac_get_state(struct acpi_ac *ac) status = acpi_evaluate_integer(ac->handle, "_PSR", NULL, &ac->state); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error reading AC Adapter state\n")); ACPI_EXCEPTION((AE_INFO, status, "Error reading AC Adapter state")); ac->state = ACPI_AC_STATUS_UNKNOWN; return_VALUE(-ENODEV); } Loading Loading @@ -159,9 +158,7 @@ static int acpi_ac_add_fs(struct acpi_device *device) entry = create_proc_entry(ACPI_AC_FILE_STATE, S_IRUGO, acpi_device_dir(device)); if (!entry) ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unable to create '%s' fs entry\n", ACPI_AC_FILE_STATE)); return_VALUE(-ENODEV); else { entry->proc_fops = &acpi_ac_fops; entry->data = acpi_driver_data(device); Loading Loading @@ -249,8 +246,6 @@ static int acpi_ac_add(struct acpi_device *device) ACPI_DEVICE_NOTIFY, acpi_ac_notify, ac); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error installing notify handler\n")); result = -ENODEV; goto end; } Loading Loading @@ -282,9 +277,6 @@ static int acpi_ac_remove(struct acpi_device *device, int type) status = acpi_remove_notify_handler(ac->handle, ACPI_DEVICE_NOTIFY, acpi_ac_notify); if (ACPI_FAILURE(status)) ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error removing notify handler\n")); acpi_ac_remove_fs(device); Loading
drivers/acpi/acpi_memhotplug.c +26 −41 Original line number Diff line number Diff line Loading @@ -125,15 +125,14 @@ acpi_memory_get_device(acpi_handle handle, status = acpi_get_parent(handle, &phandle); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error in acpi_get_parent\n")); ACPI_EXCEPTION((AE_INFO, status, "Cannot find acpi parent")); return_VALUE(-EINVAL); } /* Get the parent device */ status = acpi_bus_get_device(phandle, &pdevice); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error in acpi_bus_get_device\n")); ACPI_EXCEPTION((AE_INFO, status, "Cannot get acpi bus device")); return_VALUE(-EINVAL); } Loading @@ -143,7 +142,7 @@ acpi_memory_get_device(acpi_handle handle, */ status = acpi_bus_add(&device, pdevice, handle, ACPI_BUS_TYPE_DEVICE); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error in acpi_bus_add\n")); ACPI_EXCEPTION((AE_INFO, status, "Cannot add acpi bus")); return_VALUE(-EINVAL); } Loading Loading @@ -188,8 +187,7 @@ static int acpi_memory_enable_device(struct acpi_memory_device *mem_device) /* Get the range from the _CRS */ result = acpi_memory_get_device_resources(mem_device); if (result) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "\nget_device_resources failed\n")); ACPI_ERROR((AE_INFO, "get_device_resources failed")); mem_device->state = MEMORY_INVALID_STATE; return result; } Loading @@ -200,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); if (result) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "\nadd_memory failed\n")); ACPI_ERROR((AE_INFO, "add_memory failed")); mem_device->state = MEMORY_INVALID_STATE; return result; } Loading @@ -226,7 +224,7 @@ static int acpi_memory_powerdown_device(struct acpi_memory_device *mem_device) "_EJ0", &arg_list, NULL); /* Return on _EJ0 failure */ if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "_EJ0 failed.\n")); ACPI_EXCEPTION((AE_INFO, status, "_EJ0 failed")); return_VALUE(-ENODEV); } Loading Loading @@ -256,16 +254,12 @@ static int acpi_memory_disable_device(struct acpi_memory_device *mem_device) * Note: Assume that this function returns zero on success */ result = remove_memory(start, len); if (result) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Hot-Remove failed.\n")); if (result) return_VALUE(result); } /* Power-off and eject the device */ result = acpi_memory_powerdown_device(mem_device); if (result) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Device Power Down failed.\n")); /* Set the status of the device to invalid */ mem_device->state = MEMORY_INVALID_STATE; return result; Loading @@ -292,15 +286,14 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data) ACPI_DEBUG_PRINT((ACPI_DB_INFO, "\nReceived DEVICE CHECK notification for device\n")); if (acpi_memory_get_device(handle, &mem_device)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error in finding driver data\n")); ACPI_ERROR((AE_INFO, "Cannot find driver data")); return_VOID; } if (!acpi_memory_check_device(mem_device)) { if (acpi_memory_enable_device(mem_device)) ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error in acpi_memory_enable_device\n")); ACPI_ERROR((AE_INFO, "Cannot enable memory device")); } break; case ACPI_NOTIFY_EJECT_REQUEST: Loading @@ -308,14 +301,12 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data) "\nReceived EJECT REQUEST notification for device\n")); if (acpi_bus_get_device(handle, &device)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Device doesn't exist\n")); ACPI_ERROR((AE_INFO, "Device doesn't exist")); break; } mem_device = acpi_driver_data(device); if (!mem_device) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Driver Data is NULL\n")); ACPI_ERROR((AE_INFO, "Driver Data is NULL")); break; } Loading @@ -326,8 +317,8 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data) * with generic sysfs driver */ if (acpi_memory_disable_device(mem_device)) ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error in acpi_memory_disable_device\n")); ACPI_ERROR((AE_INFO, "Disable memory device\n")); /* * TBD: Invoke acpi_bus_remove to cleanup data structures */ Loading Loading @@ -405,7 +396,7 @@ static acpi_status is_memory_device(acpi_handle handle) status = acpi_get_object_info(handle, &buffer); if (ACPI_FAILURE(status)) return_ACPI_STATUS(AE_ERROR); return_ACPI_STATUS(status); info = buffer.pointer; if (!(info->valid & ACPI_VALID_HID)) { Loading @@ -431,18 +422,15 @@ acpi_memory_register_notify_handler(acpi_handle handle, ACPI_FUNCTION_TRACE("acpi_memory_register_notify_handler"); status = is_memory_device(handle); if (ACPI_FAILURE(status)) return_ACPI_STATUS(AE_OK); /* continue */ status = acpi_install_notify_handler(handle, ACPI_SYSTEM_NOTIFY, acpi_memory_device_notify, NULL); if (ACPI_FAILURE(status)){ ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error installing notify handler\n")); ACPI_EXCEPTION((AE_INFO, status, "handle is no memory device")); return_ACPI_STATUS(AE_OK); /* continue */ } return_ACPI_STATUS(status); status = acpi_install_notify_handler(handle, ACPI_SYSTEM_NOTIFY, acpi_memory_device_notify, NULL); /* continue */ return_ACPI_STATUS(AE_OK); } static acpi_status Loading @@ -454,19 +442,16 @@ acpi_memory_deregister_notify_handler(acpi_handle handle, ACPI_FUNCTION_TRACE("acpi_memory_deregister_notify_handler"); status = is_memory_device(handle); if (ACPI_FAILURE(status)) if (ACPI_FAILURE(status)){ ACPI_EXCEPTION((AE_INFO, status, "handle is no memory device")); return_ACPI_STATUS(AE_OK); /* continue */ } status = acpi_remove_notify_handler(handle, ACPI_SYSTEM_NOTIFY, acpi_memory_device_notify); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error removing notify handler\n")); return_ACPI_STATUS(AE_OK); /* continue */ } return_ACPI_STATUS(status); return_ACPI_STATUS(AE_OK); /* continue */ } static int __init acpi_memory_device_init(void) Loading @@ -487,7 +472,7 @@ static int __init acpi_memory_device_init(void) NULL, NULL); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "walk_namespace failed\n")); ACPI_EXCEPTION((AE_INFO, status, "walk_namespace failed")); acpi_bus_unregister_driver(&acpi_memory_device_driver); return_VALUE(-ENODEV); } Loading @@ -511,7 +496,7 @@ static void __exit acpi_memory_device_exit(void) NULL, NULL); if (ACPI_FAILURE(status)) ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "walk_namespace failed\n")); ACPI_EXCEPTION((AE_INFO, status, "walk_namespace failed")); acpi_bus_unregister_driver(&acpi_memory_device_driver); Loading
drivers/acpi/battery.c +9 −22 Original line number Diff line number Diff line Loading @@ -141,7 +141,7 @@ acpi_battery_get_info(struct acpi_battery *battery, status = acpi_evaluate_object(battery->handle, "_BIF", NULL, &buffer); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _BIF\n")); ACPI_EXCEPTION((AE_INFO, status, "Evaluating _BIF")); return_VALUE(-ENODEV); } Loading @@ -151,7 +151,7 @@ acpi_battery_get_info(struct acpi_battery *battery, status = acpi_extract_package(package, &format, &data); if (status != AE_BUFFER_OVERFLOW) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error extracting _BIF\n")); ACPI_EXCEPTION((AE_INFO, status, "Extracting _BIF")); result = -ENODEV; goto end; } Loading @@ -165,7 +165,7 @@ acpi_battery_get_info(struct acpi_battery *battery, status = acpi_extract_package(package, &format, &data); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error extracting _BIF\n")); ACPI_EXCEPTION((AE_INFO, status, "Extracting _BIF")); kfree(data.pointer); result = -ENODEV; goto end; Loading Loading @@ -202,7 +202,7 @@ acpi_battery_get_status(struct acpi_battery *battery, status = acpi_evaluate_object(battery->handle, "_BST", NULL, &buffer); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _BST\n")); ACPI_EXCEPTION((AE_INFO, status, "Evaluating _BST")); return_VALUE(-ENODEV); } Loading @@ -212,7 +212,7 @@ acpi_battery_get_status(struct acpi_battery *battery, status = acpi_extract_package(package, &format, &data); if (status != AE_BUFFER_OVERFLOW) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error extracting _BST\n")); ACPI_EXCEPTION((AE_INFO, status, "Extracting _BST")); result = -ENODEV; goto end; } Loading @@ -226,7 +226,7 @@ acpi_battery_get_status(struct acpi_battery *battery, status = acpi_extract_package(package, &format, &data); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error extracting _BST\n")); ACPI_EXCEPTION((AE_INFO, status, "Extracting _BST")); kfree(data.pointer); result = -ENODEV; goto end; Loading Loading @@ -458,8 +458,6 @@ static int acpi_battery_read_state(struct seq_file *seq, void *offset) if ((bst->state & 0x01) && (bst->state & 0x02)) { seq_printf(seq, "charging state: charging/discharging\n"); ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Battery Charging and Discharging?\n")); } else if (bst->state & 0x01) seq_printf(seq, "charging state: discharging\n"); else if (bst->state & 0x02) Loading Loading @@ -609,9 +607,7 @@ static int acpi_battery_add_fs(struct acpi_device *device) entry = create_proc_entry(ACPI_BATTERY_FILE_INFO, S_IRUGO, acpi_device_dir(device)); if (!entry) ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unable to create '%s' fs entry\n", ACPI_BATTERY_FILE_INFO)); return_VALUE(-ENODEV); else { entry->proc_fops = &acpi_battery_info_ops; entry->data = acpi_driver_data(device); Loading @@ -622,9 +618,7 @@ static int acpi_battery_add_fs(struct acpi_device *device) entry = create_proc_entry(ACPI_BATTERY_FILE_STATUS, S_IRUGO, acpi_device_dir(device)); if (!entry) ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unable to create '%s' fs entry\n", ACPI_BATTERY_FILE_STATUS)); return_VALUE(-ENODEV); else { entry->proc_fops = &acpi_battery_state_ops; entry->data = acpi_driver_data(device); Loading @@ -636,9 +630,7 @@ static int acpi_battery_add_fs(struct acpi_device *device) S_IFREG | S_IRUGO | S_IWUSR, acpi_device_dir(device)); if (!entry) ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unable to create '%s' fs entry\n", ACPI_BATTERY_FILE_ALARM)); return_VALUE(-ENODEV); else { entry->proc_fops = &acpi_battery_alarm_ops; entry->data = acpi_driver_data(device); Loading Loading @@ -732,8 +724,6 @@ static int acpi_battery_add(struct acpi_device *device) ACPI_DEVICE_NOTIFY, acpi_battery_notify, battery); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error installing notify handler\n")); result = -ENODEV; goto end; } Loading Loading @@ -766,9 +756,6 @@ static int acpi_battery_remove(struct acpi_device *device, int type) status = acpi_remove_notify_handler(battery->handle, ACPI_DEVICE_NOTIFY, acpi_battery_notify); if (ACPI_FAILURE(status)) ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error removing notify handler\n")); acpi_battery_remove_fs(device); Loading
drivers/acpi/bus.c +10 −12 Original line number Diff line number Diff line Loading @@ -69,8 +69,7 @@ int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device) status = acpi_get_data(handle, acpi_bus_data_handler, (void **)device); if (ACPI_FAILURE(status) || !*device) { ACPI_DEBUG_PRINT((ACPI_DB_WARN, "No context for object [%p]\n", handle)); ACPI_EXCEPTION((AE_INFO, status, "No context for object [%p]", handle)); return_VALUE(-ENODEV); } Loading Loading @@ -197,8 +196,7 @@ int acpi_bus_set_power(acpi_handle handle, int state) /* Make sure this is a valid target state */ if (!device->flags.power_manageable) { ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Device is not power manageable\n")); ACPI_INFO((AE_INFO, "Device is not power manageable")); return_VALUE(-ENODEV); } /* Loading @@ -215,13 +213,13 @@ int acpi_bus_set_power(acpi_handle handle, int state) } } if (!device->power.states[state].flags.valid) { ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Device does not support D%d\n", state)); ACPI_WARNING((AE_INFO, "Device does not support D%d", state)); return_VALUE(-ENODEV); } if (device->parent && (state < device->parent->power.state)) { ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Cannot set device to a higher-powered state than parent\n")); ACPI_WARNING((AE_INFO, "Cannot set device to a higher-powered" " state than parent")); return_VALUE(-ENODEV); } Loading Loading @@ -264,8 +262,8 @@ int acpi_bus_set_power(acpi_handle handle, int state) end: if (result) ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Error transitioning device [%s] to D%d\n", ACPI_WARNING((AE_INFO, "Transitioning device [%s] to D%d", device->pnp.bus_id, state)); else ACPI_DEBUG_PRINT((ACPI_DB_INFO, Loading Loading @@ -581,7 +579,7 @@ static int __init acpi_bus_init_irq(void) status = acpi_evaluate_object(NULL, "\\_PIC", &arg_list, NULL); if (ACPI_FAILURE(status) && (status != AE_NOT_FOUND)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _PIC\n")); ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PIC")); return_VALUE(-ENODEV); } Loading
drivers/acpi/button.c +4 −14 Original line number Diff line number Diff line Loading @@ -207,9 +207,7 @@ static int acpi_button_add_fs(struct acpi_device *device) entry = create_proc_entry(ACPI_BUTTON_FILE_INFO, S_IRUGO, acpi_device_dir(device)); if (!entry) ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unable to create '%s' fs entry\n", ACPI_BUTTON_FILE_INFO)); return_VALUE(-ENODEV); else { entry->proc_fops = &acpi_button_info_fops; entry->data = acpi_driver_data(device); Loading @@ -221,9 +219,7 @@ static int acpi_button_add_fs(struct acpi_device *device) entry = create_proc_entry(ACPI_BUTTON_FILE_STATE, S_IRUGO, acpi_device_dir(device)); if (!entry) ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unable to create '%s' fs entry\n", ACPI_BUTTON_FILE_INFO)); return -ENODEV; else { entry->proc_fops = &acpi_button_state_fops; entry->data = acpi_driver_data(device); Loading Loading @@ -349,7 +345,7 @@ static int acpi_button_add(struct acpi_device *device) sprintf(acpi_device_class(device), "%s/%s", ACPI_BUTTON_CLASS, ACPI_BUTTON_SUBCLASS_LID); } else { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unsupported hid [%s]\n", ACPI_ERROR((AE_INFO, "Unsupported hid [%s]", acpi_device_hid(device))); result = -ENODEV; goto end; Loading Loading @@ -381,8 +377,6 @@ static int acpi_button_add(struct acpi_device *device) } if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error installing notify handler\n")); result = -ENODEV; goto end; } Loading Loading @@ -440,10 +434,6 @@ static int acpi_button_remove(struct acpi_device *device, int type) break; } if (ACPI_FAILURE(status)) ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error removing notify handler\n")); acpi_button_remove_fs(device); kfree(button); Loading