summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-power/upower/files/upower-dell-samsung-sdi-battery-quirk.patch')
-rw-r--r--sys-power/upower/files/upower-dell-samsung-sdi-battery-quirk.patch26
1 files changed, 7 insertions, 19 deletions
diff --git a/sys-power/upower/files/upower-dell-samsung-sdi-battery-quirk.patch b/sys-power/upower/files/upower-dell-samsung-sdi-battery-quirk.patch
index b0a3df1..24fb764 100644
--- a/sys-power/upower/files/upower-dell-samsung-sdi-battery-quirk.patch
+++ b/sys-power/upower/files/upower-dell-samsung-sdi-battery-quirk.patch
@@ -1,6 +1,6 @@
From 7849ca66af7f74bfdba968e979c4596c9e99ff3d Mon Sep 17 00:00:00 2001
-From: Nirbheek Chauhan <nirbheek.chauhan@gmail.com>
-Date: Tue, 9 Nov 2010 23:54:27 +0530
+From: Nirbheek Chauhan <nirbheek@gentoo.org>
+Date: Sub, 29 May 2011 15:43:22 +0530
Subject: [PATCH] Add Dell laptop battery always-discharging quirk
Once full, some Dell laptop batteries show battery state as "fully-charged" for
@@ -16,34 +16,23 @@ technology: lithium-ion
https://bugs.freedesktop.org/show_bug.cgi?id=31196
---
- src/linux/up-device-supply.c | 40 ++++++++++++++++++++++++++++++++++++++++
- 1 files changed, 40 insertions(+), 0 deletions(-)
+ src/linux/up-device-supply.c | 37 ++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 37 insertions(+), 0 deletions(-)
diff --git a/src/linux/up-device-supply.c b/src/linux/up-device-supply.c
index 341f5df..4294e04 100644
--- a/src/linux/up-device-supply.c
+++ b/src/linux/up-device-supply.c
-@@ -402,6 +402,9 @@ up_device_supply_refresh_battery (UpDeviceSupply *supply)
+@@ -402,6 +402,8 @@ up_device_supply_refresh_battery (UpDeviceSupply *supply)
UpDeviceState old_state;
UpDeviceState state;
UpDevice *device = UP_DEVICE (supply);
+ UpDevice *device_tmp;
+ UpDeviceKind type;
-+ GPtrArray *devices;
const gchar *native_path;
GUdevDevice *native;
gboolean is_present;
-@@ -422,7 +425,9 @@ up_device_supply_refresh_battery (UpDeviceSupply *supply)
- const gchar *recall_url = NULL;
- UpDaemon *daemon;
- gboolean on_battery;
-+ gboolean online;
- guint battery_count;
-+ guint i;
-
- native = G_UDEV_DEVICE (up_device_get_native (device));
- native_path = g_udev_device_get_sysfs_path (native);
-@@ -599,6 +604,41 @@ up_device_supply_refresh_battery (UpDeviceSupply *supply)
+@@ -599,6 +604,40 @@ up_device_supply_refresh_battery (UpDeviceSupply *supply)
if (percentage > 100.0f)
percentage = 100.0f;
}
@@ -53,7 +42,7 @@ index 341f5df..4294e04 100644
+ daemon = up_device_get_daemon (device);
+ /* get states of AC power supplies */
+ devices = up_device_list_get_array (up_daemon_get_device_list(daemon));
-+ for (i=0; i<devices->len; i++) {
++ for (i = 0; i < devices->len; i++) {
+ device_tmp = (UpDevice *) g_ptr_array_index (devices, i);
+ g_object_get (device_tmp,
+ "type", &type,
@@ -81,7 +70,6 @@ index 341f5df..4294e04 100644
+
+ g_ptr_array_unref (devices);
+ }
-+
/* the battery isn't charging or discharging, it's just
* sitting there half full doing nothing: try to guess a state */