Commit 46d839ad authored by shitao's avatar shitao Committed by Rafael J. Wysocki
Browse files

ACPI: battery: Round capacity percengate to closest integer



If the difference between capacity_now and full_capacity is
within 0.5%, 100% is arguably a better number to expose than
99% and exposing the latter may confuse the user to think that
there's something wrong with the battery.

Round the capacity percentage to the closest integer value to
avoid the confusion.

Signed-off-by: default avatarshitao <shitao@kylinos.cn>
Link: https://patch.msgid.link/20250407085419.494234-1-shitao@kylinos.cn


[ rjw: Subject and changelog edits ]
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 0af2f6be
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment