All of lore.kernel.org
 help / color / mirror / Atom feed
From: Len Brown <lenb@kernel.org>
To: linux-acpi@vger.kernel.org
Cc: Vladimir Lebedev <vladimir.p.lebedev@intel.com>,
	Len Brown <len.brown@intel.com>
Subject: [PATCH 06/22] ACPI: battery: Lindent
Date: Fri,  9 Mar 2007 23:00:43 -0500	[thread overview]
Message-ID: <11734992663237-git-send-email-lenb@kernel.org> (raw)
Message-ID: <9ea7d57576f40c6af03c8c9fa7a069f2222b498b.1173498653.git.len.brown@intel.com> (raw)
In-Reply-To: <11734992592550-git-send-email-lenb@kernel.org>
In-Reply-To: <941b1971a405f95537bc6f9a738e737eb2186e45.1173498647.git.len.brown@intel.com>

From: Vladimir Lebedev <vladimir.p.lebedev@intel.com>

Signed-off-by: Vladimir Lebedev <vladimir.p.lebedev@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
---
 drivers/acpi/battery.c |   36 +++++++++++++++++++++++-------------
 1 files changed, 23 insertions(+), 13 deletions(-)

diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index f3b0024..fc9c50a 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,
-- 
1.5.0.3.310.g05ef5

  parent reply	other threads:[~2007-03-10  4:01 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-10  4:00 ACPI patches in test for Linux-2.6.22 Len Brown
2007-03-10  4:00 ` [PATCH 01/22] cpuidle take2: Core cpuidle infrastructure Len Brown
2007-03-10  4:00   ` Len Brown
2007-03-15 12:31     ` Andi Kleen
2007-03-15 16:47       ` Len Brown
2007-03-15 13:13     ` Richard Hughes
2007-03-15 16:38       ` Len Brown
2007-03-15 16:42         ` Richard Hughes
2007-03-10  4:00   ` [PATCH 02/22] cpuidle take2: Hookup ACPI C-states driver with cpuidle Len Brown
2007-03-10  4:00     ` Len Brown
2007-03-10  4:00   ` [PATCH 03/22] cpuidle take2: Basic documentation for cpuidle Len Brown
2007-03-10  4:00     ` Len Brown
2007-03-10  4:00   ` [PATCH 04/22] ACPI: battery: make internal names consistent with battery "state" Len Brown
2007-03-10  4:00     ` Len Brown
2007-03-10  4:00   ` [PATCH 05/22] ACPI: Cache battery status instead of re-evaluating AML Len Brown
2007-03-10  4:00     ` Len Brown
2007-04-19 18:23       ` Andrew Morton
2007-03-10  4:00   ` Len Brown [this message]
2007-03-10  4:00     ` [PATCH 06/22] ACPI: battery: Lindent Len Brown
2007-03-10  4:00   ` [PATCH 07/22] cpuidle: build fix for !CPU_IDLE Len Brown
2007-03-10  4:00     ` Len Brown
2007-03-10  4:00   ` [PATCH 08/22] cpu_idle: fix build break Len Brown
2007-03-10  4:00     ` Len Brown
2007-03-10  4:00   ` [PATCH 09/22] cpuidle: make code static Len Brown
2007-03-10  4:00     ` Len Brown
2007-03-10  4:00   ` [PATCH 10/22] cpuidle: ladder does not depend on ACPI Len Brown
2007-03-10  4:00     ` Len Brown
2007-03-10  4:00   ` [PATCH 11/22] ACPI: EC: Don't use Global Lock if not asked to do so Len Brown
2007-03-10  4:00     ` Len Brown
2007-03-10 14:12     ` Sanjoy Mahajan
2007-03-10  4:00   ` [PATCH 12/22] ACPI: EC: Make EC to initialize first in ACPI Len Brown
2007-03-10  4:00     ` Len Brown
2007-03-10  4:00   ` [PATCH 13/22] ACPI: EC: "Fake ECDT" workaround is not needed any longer Len Brown
2007-03-10  4:00     ` Len Brown
2007-03-10  4:00   ` [PATCH 14/22] ACPI: EC: enable burst functionality in EC Len Brown
2007-03-10  4:00     ` Len Brown
2007-03-10  4:00   ` [PATCH 15/22] ACPI: EC: Remove casts to/from void* from ec.c Len Brown
2007-03-10  4:00     ` Len Brown
2007-03-10  4:00   ` [PATCH 16/22] ACPI: EC: Put install handlers into separate function Len Brown
2007-03-10  4:00     ` Len Brown
2007-03-10  4:00   ` [PATCH 17/22] ACPI: EC: Clean ECDT and namespace parsing Len Brown
2007-03-10  4:00     ` Len Brown
2007-03-10  4:00   ` [PATCH 18/22] ACPI: EC: Rename ec_ecdt to more informative boot_ec Len Brown
2007-03-10  4:00     ` Len Brown
2007-03-10  4:00   ` [PATCH 19/22] ACPI: EC: first_ec is better to be acpi_ec than acpi_device Len Brown
2007-03-10  4:00     ` Len Brown
2007-03-10  4:00   ` [PATCH 20/22] ACPI: EC: Cleanup of EC initialization Len Brown
2007-03-10  4:00     ` Len Brown
2007-03-10  4:00   ` [PATCH 21/22] ACPI: EC: Block queries until EC is fully initialized Len Brown
2007-03-10  4:00     ` Len Brown
2007-03-16 17:58 ` ACPI patches in test for Linux-2.6.22 Sergio Monteiro Basto
2007-03-16 18:03   ` Alexey Starikovskiy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11734992663237-git-send-email-lenb@kernel.org \
    --to=lenb@kernel.org \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=vladimir.p.lebedev@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.