struct acpi_battery {
struct mutex mutex;
- struct acpi_device * device;
+ struct acpi_device *device;
struct acpi_battery_flags flags;
struct acpi_buffer bif_data;
struct acpi_buffer bst_data;
/* Evalute _BIF */
- status = acpi_evaluate_object(acpi_battery_handle(battery), "_BIF", NULL, &buffer);
+ status =
+ acpi_evaluate_object(acpi_battery_handle(battery), "_BIF", NULL,
+ &buffer);
if (ACPI_FAILURE(status)) {
ACPI_EXCEPTION((AE_INFO, status, "Evaluating _BIF"));
return -ENODEV;
/* Extract Package Data */
- result = acpi_battery_extract_package(battery, package, &format, data, "_BIF");
+ result =
+ acpi_battery_extract_package(battery, package, &format, data,
+ "_BIF");
if (result)
goto end;
/* Evalute _BST */
- status = acpi_evaluate_object(acpi_battery_handle(battery), "_BST", NULL, &buffer);
+ status =
+ acpi_evaluate_object(acpi_battery_handle(battery), "_BST", NULL,
+ &buffer);
if (ACPI_FAILURE(status)) {
ACPI_EXCEPTION((AE_INFO, status, "Evaluating _BST"));
return -ENODEV;
/* Extract Package Data */
- result = acpi_battery_extract_package(battery, package, &format, data, "_BST");
+ result =
+ acpi_battery_extract_package(battery, package, &format, data,
+ "_BST");
if (result)
goto end;
return 0;
}
-static int acpi_battery_set_alarm(struct acpi_battery *battery, unsigned long alarm)
+static int acpi_battery_set_alarm(struct acpi_battery *battery,
+ unsigned long alarm)
{
acpi_status status = 0;
union acpi_object arg0 = { ACPI_TYPE_INTEGER };
arg0.integer.value = alarm;
- status = acpi_evaluate_object(acpi_battery_handle(battery), "_BTP", &arg_list, NULL);
+ status =
+ acpi_evaluate_object(acpi_battery_handle(battery), "_BTP",
+ &arg_list, NULL);
if (ACPI_FAILURE(status))
return -ENODEV;
}
static int acpi_battery_update(struct acpi_battery *battery,
- int update, int *update_result_ptr)
+ int update, int *update_result_ptr)
{
int result = 0;
int update_result = ACPI_BATTERY_NONE_UPDATE;
result = acpi_battery_get_status(battery);
if (result)
goto end;;
- if (acpi_battery_inserted(battery) || acpi_battery_removed(battery)) {
+ if (acpi_battery_inserted(battery)
+ || acpi_battery_removed(battery)) {
result = acpi_battery_init_update(battery);
if (result)
goto end;;
struct acpi_battery *battery = m->private;
int update_result = ACPI_BATTERY_NONE_UPDATE;
-
if (!battery || (count > sizeof(alarm_string) - 1))
return -EINVAL;
{
struct proc_dir_entry *entry = NULL;
-
if (!acpi_device_dir(device)) {
acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device),
acpi_battery_dir);
struct acpi_battery *battery = data;
struct acpi_device *device = NULL;
-
if (!battery)
return;
device = battery->device;
acpi_battery_notify_update(battery);
acpi_battery_mutex_unlock(battery);
- acpi_bus_generate_event(device, event, acpi_battery_present(battery));
+ acpi_bus_generate_event(device, event,
+ acpi_battery_present(battery));
break;
default:
ACPI_DEBUG_PRINT((ACPI_DB_INFO,