Fixing factory kill function

orderly_poweroff is a function from kernel/reboot.c that does not work since
poweroff binary was removed from /sbin/.

Factory Kill still worked because qcom smb5 power supply driver disables
motorola factory kill and implements its own (with kernel_power_off). Since
they removed their own implementation it falls back to the broken one.

This commit replace orderly_poweroff by kernel_power_off the same way qcom
used to do.

Change-Id: Iee78e729add3e31b29c192adc7bcfbab46b1462e
Reviewed-on: https://gerrit.mot.com/1753065
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wentao Xu <xuwt2@motorola.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
Bruno Oliveira 2020-09-17 10:22:35 -03:00
commit 352a0f8435

View file

@ -3499,7 +3499,7 @@ static void mmi_heartbeat_work(struct work_struct *work)
chip->factory_kill_armed = true;
} else if (chip->factory_kill_armed && !factory_kill_disable) {
mmi_warn(chip, "Factory kill power off\n");
orderly_poweroff(true);
kernel_power_off();
} else
chip->factory_kill_armed = false;
}