mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
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:
parent
4e9e358fe8
commit
9a2b0540dc
2 changed files with 58 additions and 47 deletions
|
@ -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));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue