ACPI / SBS: Enable battery manager when present

Commit 9faf6136ff (ACPI / SBS: Disable smart battery manager on
Apple) introduced a regression disabling the SBS battery manager.
The battery manager should be marked as present when
acpi_manager_get_info() returns 0.

Fixes: 9faf6136ff (ACPI / SBS: Disable smart battery manager on Apple)
Signed-off-by: Chris Bainbridge <[email protected]>
Cc: 3.18+ <[email protected]> # 3.18+
Signed-off-by: Rafael J. Wysocki <[email protected]>
This commit is contained in:
Chris Bainbridge 2015-04-22 16:40:21 +01:00 • committed by Rafael J. Wysocki
commit 61f8ff6939

View file

@ -684,7 +684,7 @@ static int acpi_sbs_add(struct acpi_device *device)
if (!sbs_manager_broken) {
result = acpi_manager_get_info(sbs);
if (!result) {
sbs->manager_present = 0;
sbs->manager_present = 1;
for (id = 0; id < MAX_SBS_BAT; ++id)
if ((sbs->batteries_supported & (1 << id)))
acpi_battery_add(sbs, id);