summaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel/perfmon.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2018-08-07 09:36:30 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-08-09 10:49:35 +0200
commitb41901a2cf06f33c030be96c075872201089d47a (patch)
tree0f2f21d7c1a052bed2a68dc2221e689c85284cfb /arch/ia64/kernel/perfmon.c
parent2754435d4c820875412785da9bfa017a74fe51a7 (diff)
downloadop-kernel-dev-b41901a2cf06f33c030be96c075872201089d47a.zip
op-kernel-dev-b41901a2cf06f33c030be96c075872201089d47a.tar.gz
ACPI / battery: Do not export energy_full[_design] on devices without full_charge_capacity
On some devices (with a buggy _BIX implementation) full_charge_capacity always reports as 0. This means that our energy_full sysfs attribute will also always be 0, which is not useful to export. Worse we calculate our reported capacity on full_charge_capacity and if it is 0 we always report 0. This causes userspace to immediately shutdown or hibernate the laptop since it assumes that the battery is critically low. This commit makes us not report energy_full[_design] or capacity on such broken devices, avoiding the immediate shutdown / hibernate from userspace. Link: https://bugzilla.kernel.org/show_bug.cgi?id=83941 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'arch/ia64/kernel/perfmon.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud