arm: stm32mp: stm32prog: use IS_ENABLED to prevent ifdef

Use IS_ENABLED to prevent ifdef in stm32prog command.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
This commit is contained in:
Patrick Delaunay 2020-07-31 16:31:52 +02:00 committed by Patrice Chotard
parent 4e9e358fe8
commit 9a2b0540dc
2 changed files with 58 additions and 47 deletions

View file

@ -14,7 +14,6 @@ struct stm32prog_data *stm32prog_data;
static void enable_vidconsole(void)
{
#ifdef CONFIG_DM_VIDEO
char *stdname;
char buf[64];
@ -35,7 +34,6 @@ static void enable_vidconsole(void)
snprintf(buf, sizeof(buf), "%s,vidconsole", stdname);
env_set("stderr", buf);
}
#endif
}
static int do_stm32prog(struct cmd_tbl *cmdtp, int flag, int argc,
@ -86,7 +84,8 @@ static int do_stm32prog(struct cmd_tbl *cmdtp, int flag, int argc,
"script@1");
}
enable_vidconsole();
if (IS_ENABLED(CONFIG_DM_VIDEO))
enable_vidconsole();
data = (struct stm32prog_data *)malloc(sizeof(*data));