summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/battery.c
diff options
context:
space:
mode:
authorVladimir Lebedev <vladimir.p.lebedev@intel.com>2007-02-20 15:48:06 +0300
committerLen Brown <len.brown@intel.com>2007-03-07 01:48:11 -0500
commit9ea7d57576f40c6af03c8c9fa7a069f2222b498b (patch)
tree260a78a0a77f5e524e25296d42ac284d8fa812d2 /drivers/acpi/battery.c
parentb6ce4083ed8e2a01a3a59301eabe0fc1e68a8a84 (diff)
downloadtalos-obmc-linux-9ea7d57576f40c6af03c8c9fa7a069f2222b498b.tar.gz
talos-obmc-linux-9ea7d57576f40c6af03c8c9fa7a069f2222b498b.zip
ACPI: battery: Lindent
Signed-off-by: Vladimir Lebedev <vladimir.p.lebedev@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/battery.c')
-rw-r--r--drivers/acpi/battery.c36
1 files changed, 23 insertions, 13 deletions
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index f3b0024e5760..fc9c50ab5219 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -123,7 +123,7 @@ struct acpi_battery_flags {
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;
@@ -241,7 +241,9 @@ static int acpi_battery_get_info(struct acpi_battery *battery)
/* 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;
@@ -253,7 +255,9 @@ static int acpi_battery_get_info(struct acpi_battery *battery)
/* 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;
@@ -289,7 +293,9 @@ static int acpi_battery_get_state(struct acpi_battery *battery)
/* 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;
@@ -301,7 +307,9 @@ static int acpi_battery_get_state(struct acpi_battery *battery)
/* 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;
@@ -320,7 +328,8 @@ static int acpi_battery_get_alarm(struct acpi_battery *battery)
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 };
@@ -336,7 +345,9 @@ static int acpi_battery_set_alarm(struct acpi_battery *battery, unsigned long al
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;
@@ -400,7 +411,7 @@ static int acpi_battery_init_update(struct acpi_battery *battery)
}
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;
@@ -418,7 +429,8 @@ static int acpi_battery_update(struct acpi_battery *battery,
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;;
@@ -770,7 +782,6 @@ acpi_battery_write_alarm(struct file *file,
struct acpi_battery *battery = m->private;
int update_result = ACPI_BATTERY_NONE_UPDATE;
-
if (!battery || (count > sizeof(alarm_string) - 1))
return -EINVAL;
@@ -845,7 +856,6 @@ static int acpi_battery_add_fs(struct acpi_device *device)
{
struct proc_dir_entry *entry = NULL;
-
if (!acpi_device_dir(device)) {
acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device),
acpi_battery_dir);
@@ -917,7 +927,6 @@ static void acpi_battery_notify(acpi_handle handle, u32 event, void *data)
struct acpi_battery *battery = data;
struct acpi_device *device = NULL;
-
if (!battery)
return;
@@ -932,7 +941,8 @@ static void acpi_battery_notify(acpi_handle handle, u32 event, void *data)
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,
OpenPOWER on IntegriCloud