From 8aaa59243c920bd99a76253ce270462cb94c58fe Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Fri, 18 Oct 2013 15:48:57 +0200 Subject: 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. --- src/linux/up-device-supply.c | 7 +++++++ 1 file changed, 7 insertions(+) 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) { -- cgit v1.2.1