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 04/22] ACPI: battery: make internal names consistent with battery "state"
Date: Fri, 9 Mar 2007 23:00:41 -0500 [thread overview]
Message-ID: <11734992641781-git-send-email-lenb@kernel.org> (raw)
Message-ID: <a1f0eff21edac1bd87e397f56c4258b9611b5a50.1173498652.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>
Cleanup -- No functional changes.
Battery state is currently exported in a proc "state" file.
Update associated #defines and routines to be consistent.
Signed-off-by: Vladimir Lebedev <vladimir.p.lebedev@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/acpi/battery.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index e64c76c..df04f87 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -44,7 +44,7 @@
#define ACPI_BATTERY_HID "PNP0C0A"
#define ACPI_BATTERY_DEVICE_NAME "Battery"
#define ACPI_BATTERY_FILE_INFO "info"
-#define ACPI_BATTERY_FILE_STATUS "state"
+#define ACPI_BATTERY_FILE_STATE "state"
#define ACPI_BATTERY_FILE_ALARM "alarm"
#define ACPI_BATTERY_NOTIFY_STATUS 0x80
#define ACPI_BATTERY_NOTIFY_INFO 0x81
@@ -76,7 +76,7 @@ static struct acpi_driver acpi_battery_driver = {
},
};
-struct acpi_battery_status {
+struct acpi_battery_state {
acpi_integer state;
acpi_integer present_rate;
acpi_integer remaining_capacity;
@@ -183,8 +183,8 @@ acpi_battery_get_info(struct acpi_battery *battery,
}
static int
-acpi_battery_get_status(struct acpi_battery *battery,
- struct acpi_battery_status **bst)
+acpi_battery_get_state(struct acpi_battery *battery,
+ struct acpi_battery_state **bst)
{
int result = 0;
acpi_status status = 0;
@@ -425,7 +425,7 @@ static int acpi_battery_read_state(struct seq_file *seq, void *offset)
{
int result = 0;
struct acpi_battery *battery = seq->private;
- struct acpi_battery_status *bst = NULL;
+ struct acpi_battery_state *bst = NULL;
char *units = "?";
@@ -449,9 +449,9 @@ static int acpi_battery_read_state(struct seq_file *seq, void *offset)
/* Battery Status (_BST) */
- result = acpi_battery_get_status(battery, &bst);
+ result = acpi_battery_get_state(battery, &bst);
if (result || !bst) {
- seq_printf(seq, "ERROR: Unable to read battery status\n");
+ seq_printf(seq, "ERROR: Unable to read battery state\n");
goto end;
}
@@ -621,7 +621,7 @@ static int acpi_battery_add_fs(struct acpi_device *device)
}
/* 'status' [R] */
- entry = create_proc_entry(ACPI_BATTERY_FILE_STATUS,
+ entry = create_proc_entry(ACPI_BATTERY_FILE_STATE,
S_IRUGO, acpi_device_dir(device));
if (!entry)
return -ENODEV;
@@ -652,7 +652,7 @@ static int acpi_battery_remove_fs(struct acpi_device *device)
if (acpi_device_dir(device)) {
remove_proc_entry(ACPI_BATTERY_FILE_ALARM,
acpi_device_dir(device));
- remove_proc_entry(ACPI_BATTERY_FILE_STATUS,
+ remove_proc_entry(ACPI_BATTERY_FILE_STATE,
acpi_device_dir(device));
remove_proc_entry(ACPI_BATTERY_FILE_INFO,
acpi_device_dir(device));
--
1.5.0.3.310.g05ef5
next prev 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 ` Len Brown [this message]
2007-03-10 4:00 ` [PATCH 04/22] ACPI: battery: make internal names consistent with battery "state" 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 ` [PATCH 06/22] ACPI: battery: Lindent Len Brown
2007-03-10 4:00 ` 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=11734992641781-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.