diff options
author | Bastien Nocera <hadess@hadess.net> | 2013-10-18 15:48:57 +0200 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2013-10-18 16:16:54 +0200 |
commit | 8aaa59243c920bd99a76253ce270462cb94c58fe (patch) | |
tree | 8f9f83977be18bdf2076022f742faedaa6b8dbd0 | |
parent | b3d23684545d08d6c7df0643b560fd5d1346154b (diff) | |
download | upower-8aaa59243c920bd99a76253ce270462cb94c58fe.tar.gz |
linux: Ignore ACs coming from devices
We already have enough information on the device battery.
This avoids having a device for the wacom AC which we won't use.
-rw-r--r-- | src/linux/up-device-supply.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/linux/up-device-supply.c b/src/linux/up-device-supply.c index b9ed2c7..a180a7b 100644 --- a/src/linux/up-device-supply.c +++ b/src/linux/up-device-supply.c @@ -854,6 +854,13 @@ up_device_supply_coldplug (UpDevice *device) supply->priv->is_power_supply = TRUE; } + /* we don't use separate ACs for devices */ + if (supply->priv->is_power_supply == FALSE && + !sysfs_file_exists (native_path, "capacity")) { + g_debug ("Ignoring device AC, we'll monitor the device battery"); + goto out; + } + /* try to detect using the device type */ device_type = up_device_supply_get_string (native_path, "type"); if (device_type != NULL) { |