diff --git a/acpi-update-battery-information-on-notification-0x81.patch b/acpi-update-battery-information-on-notification-0x81.patch index 5fe34b9c0..e9c027291 100644 --- a/acpi-update-battery-information-on-notification-0x81.patch +++ b/acpi-update-battery-information-on-notification-0x81.patch @@ -1,25 +1,6 @@ -From kyle@infradead.org Wed Sep 22 18:35:38 2010 -From: Matthew Garrett -To: linux-acpi@vger.kernel.org -Cc: linux-kernel@vger.kernel.org, Matthew Garrett -Subject: [PATCH] acpi: Update battery information on notification 0x81 -Date: Mon, 16 Aug 2010 16:32:19 -0400 - -A notification event 0x81 from an ACPI battery device requires us to -re-read the battery information structure. Do so, and if the battery's -reporting units have changed (as is the case on some Thinkpads) destroy -and recreate the battery in order to populate the fields correctly. - -Signed-off-by: Matthew Garrett ---- - drivers/acpi/battery.c | 22 +++++++++++++++++----- - 1 files changed, 17 insertions(+), 5 deletions(-) - -diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c -index dc58402..69638c4 100644 ---- a/drivers/acpi/battery.c -+++ b/drivers/acpi/battery.c -@@ -562,9 +562,10 @@ static void acpi_battery_quirks(struct acpi_battery *battery) +--- linux-2.6.35.x86_64/drivers/acpi/battery.c.orig 2010-12-23 10:42:09.291854595 -0500 ++++ linux-2.6.35.x86_64/drivers/acpi/battery.c 2010-12-23 10:44:30.996045838 -0500 +@@ -596,9 +596,10 @@ } } @@ -31,7 +12,7 @@ index dc58402..69638c4 100644 result = acpi_battery_get_status(battery); if (result) return result; -@@ -587,6 +588,16 @@ static int acpi_battery_update(struct acpi_battery *battery) +@@ -621,6 +622,16 @@ if (!battery->bat.dev) sysfs_add_battery(battery); #endif @@ -45,10 +26,10 @@ index dc58402..69638c4 100644 + } +#endif + } - return acpi_battery_get_state(battery); - } - -@@ -762,7 +773,7 @@ static print_func acpi_print_funcs[ACPI_BATTERY_NUMFILES] = { + result = acpi_battery_get_state(battery); + acpi_battery_quirks2(battery); + return result; +@@ -798,7 +809,7 @@ static int acpi_battery_read(int fid, struct seq_file *seq) { struct acpi_battery *battery = seq->private; @@ -57,7 +38,7 @@ index dc58402..69638c4 100644 return acpi_print_funcs[fid](seq, result); } -@@ -877,7 +888,8 @@ static void acpi_battery_notify(struct acpi_device *device, u32 event) +@@ -913,7 +924,8 @@ #ifdef CONFIG_ACPI_SYSFS_POWER old = battery->bat.dev; #endif @@ -67,7 +48,7 @@ index dc58402..69638c4 100644 acpi_bus_generate_proc_event(device, event, acpi_battery_present(battery)); acpi_bus_generate_netlink_event(device->pnp.device_class, -@@ -908,7 +920,7 @@ static int acpi_battery_add(struct acpi_device *device) +@@ -944,7 +956,7 @@ if (ACPI_SUCCESS(acpi_get_handle(battery->device->handle, "_BIX", &handle))) set_bit(ACPI_BATTERY_XINFO_PRESENT, &battery->flags); @@ -76,7 +57,7 @@ index dc58402..69638c4 100644 #ifdef CONFIG_ACPI_PROCFS_POWER result = acpi_battery_add_fs(device); #endif -@@ -951,7 +963,7 @@ static int acpi_battery_resume(struct acpi_device *device) +@@ -987,7 +999,7 @@ return -EINVAL; battery = acpi_driver_data(device); battery->update_time = 0; @@ -85,12 +66,3 @@ index dc58402..69638c4 100644 return 0; } --- -1.7.2.1 - --- -To unsubscribe from this list: send the line "unsubscribe linux-kernel" in -the body of a message to majordomo@vger.kernel.org -More majordomo info at http://vger.kernel.org/majordomo-info.html -Please read the FAQ at http://www.tux.org/lkml/ -