Commit 61f8ff69 authored by Chris Bainbridge's avatar Chris Bainbridge Committed by Rafael J. Wysocki

ACPI / SBS: Enable battery manager when present

Commit 9faf6136 (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: 9faf6136 (ACPI / SBS: Disable smart battery manager on Apple)
Signed-off-by: default avatarChris Bainbridge <chris.bainbridge@gmail.com>
Cc: 3.18+ <stable@vger.kernel.org> # 3.18+
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent b787f68c
...@@ -684,7 +684,7 @@ static int acpi_sbs_add(struct acpi_device *device) ...@@ -684,7 +684,7 @@ static int acpi_sbs_add(struct acpi_device *device)
if (!sbs_manager_broken) { if (!sbs_manager_broken) {
result = acpi_manager_get_info(sbs); result = acpi_manager_get_info(sbs);
if (!result) { if (!result) {
sbs->manager_present = 0; sbs->manager_present = 1;
for (id = 0; id < MAX_SBS_BAT; ++id) for (id = 0; id < MAX_SBS_BAT; ++id)
if ((sbs->batteries_supported & (1 << id))) if ((sbs->batteries_supported & (1 << id)))
acpi_battery_add(sbs, id); acpi_battery_add(sbs, id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment