#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
},
};
-struct acpi_battery_status {
+struct acpi_battery_state {
acpi_integer state;
acpi_integer present_rate;
acpi_integer remaining_capacity;
}
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;
{
int result = 0;
struct acpi_battery *battery = seq->private;
- struct acpi_battery_status *bst = NULL;
+ struct acpi_battery_state *bst = NULL;
char *units = "?";
/* 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;
}
}
/* '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;
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));