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

Commit d929d0e5 authored by Kumar Gala's avatar Kumar Gala Committed by Matt Wagantall
Browse files

power: reset: Fix build with !CONFIG_MSM_DLOAD_MODE



We only define in_panic when CONFIG_MSM_DLOAD_MODE is enabled.  Otherwise
we get the following compile error:

drivers/power/reset/msm-poweroff.c: In function ‘do_msm_restart’:
drivers/power/reset/msm-poweroff.c:276:28: error: ‘in_panic’
	undeclared (first use in this function)
  if (WDOG_BITE_ON_PANIC && in_panic)
                            ^
drivers/power/reset/msm-poweroff.c:276:28: note: each undeclared identifier
is reported only once for each function it appears in

Just add simple #ifdef CONFIG_MSM_DLOAD_MODE around the code to fix.

Change-Id: I01f8641e90dd000813127a5b8ce730529f3485cc
Signed-off-by: default avatarKumar Gala <galak@codeaurora.org>
parent 7d88ec31
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -268,6 +268,7 @@ static void do_msm_restart(enum reboot_mode reboot_mode, const char *cmd)

	msm_restart_prepare(cmd);

#ifdef CONFIG_MSM_DLOAD_MODE
	/*
	 * Trigger a watchdog bite here and if this fails,
	 * device will take the usual restart path.
@@ -275,6 +276,7 @@ static void do_msm_restart(enum reboot_mode reboot_mode, const char *cmd)

	if (WDOG_BITE_ON_PANIC && in_panic)
		msm_trigger_wdog_bite();
#endif

	/* Needed to bypass debug image on some chips */
	if (!is_scm_armv8())