diff options
author | Kyle McMartin <kyle@redhat.com> | 2011-01-03 10:57:25 -0500 |
---|---|---|
committer | Kyle McMartin <kyle@redhat.com> | 2011-01-03 10:57:25 -0500 |
commit | d6f08ea2fb6d6e96181f327cb722691213a0a6ac (patch) | |
tree | 3c93e818ff31c723331da2a7594297d6226540a3 /acpi-update-battery-information-on-notification-0x81.patch | |
parent | 6a82260f5df3ff676f5e261003c1239ffe2cafc3 (diff) | |
download | kernel-d6f08ea2fb6d6e96181f327cb722691213a0a6ac.tar.gz kernel-d6f08ea2fb6d6e96181f327cb722691213a0a6ac.tar.xz kernel-d6f08ea2fb6d6e96181f327cb722691213a0a6ac.zip |
Linux 2.6.37-rc8-git3
Diffstat (limited to 'acpi-update-battery-information-on-notification-0x81.patch')
-rw-r--r-- | acpi-update-battery-information-on-notification-0x81.patch | 38 |
1 files changed, 14 insertions, 24 deletions
diff --git a/acpi-update-battery-information-on-notification-0x81.patch b/acpi-update-battery-information-on-notification-0x81.patch index 4eef6f931..7f2c645fc 100644 --- a/acpi-update-battery-information-on-notification-0x81.patch +++ b/acpi-update-battery-information-on-notification-0x81.patch @@ -13,32 +13,22 @@ and recreate the battery in order to populate the fields correctly. Signed-off-by: Matthew Garrett <mjg@redhat.com> --- - drivers/acpi/battery.c | 24 +++++++++++++++++------- - 1 files changed, 17 insertions(+), 7 deletions(-) + drivers/acpi/battery.c | 21 ++++++++++++++++----- + 1 files changed, 16 insertions(+), 5 deletions(-) diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c -index 9fb9d5a..8da9c88 100644 +index 95649d3..161e43a 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c -@@ -130,7 +130,7 @@ struct acpi_battery { - unsigned long flags; - }; +@@ -152,6 +152,7 @@ static int acpi_battery_technology(struct acpi_battery *battery) + return POWER_SUPPLY_TECHNOLOGY_UNKNOWN; + } --static int acpi_battery_update(struct acpi_battery *battery); +static int acpi_battery_update(struct acpi_battery *battery, bool get_info); + static int acpi_battery_get_state(struct acpi_battery *battery); - #define to_acpi_battery(x) container_of(x, struct acpi_battery, bat); - -@@ -186,7 +186,7 @@ static int acpi_battery_get_property(struct power_supply *psy, - int ret = 0; - struct acpi_battery *battery = to_acpi_battery(psy); - -- if (acpi_battery_update(battery)) -+ if (acpi_battery_update(battery, false)) - return -ENODEV; - - if (acpi_battery_present(battery)) { -@@ -610,9 +610,11 @@ static void acpi_battery_quirks2(struct acpi_battery *battery) + static int acpi_battery_is_charged(struct acpi_battery *battery) +@@ -605,9 +606,11 @@ static void acpi_battery_quirks2(struct acpi_battery *battery) } } @@ -51,7 +41,7 @@ index 9fb9d5a..8da9c88 100644 result = acpi_battery_get_status(battery); if (result) return result; -@@ -631,6 +633,14 @@ static int acpi_battery_update(struct acpi_battery *battery) +@@ -626,6 +629,14 @@ static int acpi_battery_update(struct acpi_battery *battery) } if (!battery->bat.dev) sysfs_add_battery(battery); @@ -66,7 +56,7 @@ index 9fb9d5a..8da9c88 100644 result = acpi_battery_get_state(battery); acpi_battery_quirks2(battery); return result; -@@ -808,7 +818,7 @@ static print_func acpi_print_funcs[ACPI_BATTERY_NUMFILES] = { +@@ -803,7 +814,7 @@ static print_func acpi_print_funcs[ACPI_BATTERY_NUMFILES] = { static int acpi_battery_read(int fid, struct seq_file *seq) { struct acpi_battery *battery = seq->private; @@ -75,7 +65,7 @@ index 9fb9d5a..8da9c88 100644 return acpi_print_funcs[fid](seq, result); } -@@ -919,7 +929,7 @@ static void acpi_battery_notify(struct acpi_device *device, u32 event) +@@ -914,7 +925,7 @@ static void acpi_battery_notify(struct acpi_device *device, u32 event) if (!battery) return; old = battery->bat.dev; @@ -84,7 +74,7 @@ index 9fb9d5a..8da9c88 100644 acpi_bus_generate_proc_event(device, event, acpi_battery_present(battery)); acpi_bus_generate_netlink_event(device->pnp.device_class, -@@ -948,7 +958,7 @@ static int acpi_battery_add(struct acpi_device *device) +@@ -943,7 +954,7 @@ static int acpi_battery_add(struct acpi_device *device) if (ACPI_SUCCESS(acpi_get_handle(battery->device->handle, "_BIX", &handle))) set_bit(ACPI_BATTERY_XINFO_PRESENT, &battery->flags); @@ -93,7 +83,7 @@ index 9fb9d5a..8da9c88 100644 #ifdef CONFIG_ACPI_PROCFS_POWER result = acpi_battery_add_fs(device); #endif -@@ -989,7 +999,7 @@ static int acpi_battery_resume(struct acpi_device *device) +@@ -984,7 +995,7 @@ static int acpi_battery_resume(struct acpi_device *device) return -EINVAL; battery = acpi_driver_data(device); battery->update_time = 0; |