Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ea868211 authored by Stepan Moskovchenko's avatar Stepan Moskovchenko
Browse files

power: reset: Fix handling of OEM commands



The change to remove the native MSM reboot driver
incorrectly refactored the OEM command handling code to use
kstrtoul() to parse the OEM command ID. Fix that.

CRs-Fixed: 663628
Change-Id: I073043266127818815fb4e6376c92c2b2fd953a5
Signed-off-by: default avatarStepan Moskovchenko <stepanm@codeaurora.org>
parent 63704274
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -209,8 +209,11 @@ static void msm_restart_prepare(const char *cmd)
			__raw_writel(0x77665503, restart_reason);
		} else if (!strncmp(cmd, "oem-", 4)) {
			unsigned long code;
			code = kstrtoul(cmd + 4, 16, NULL) & 0xff;
			__raw_writel(0x6f656d00 | code, restart_reason);
			int ret;
			ret = kstrtoul(cmd + 4, 16, &code);
			if (!ret)
				__raw_writel(0x6f656d00 | (code & 0xff),
					     restart_reason);
		} else if (!strncmp(cmd, "edl", 3)) {
			enable_emergency_dload_mode();
		} else {