From 9a2b0540dc62ccc2a1a2d58727d1eec5466d1a0f Mon Sep 17 00:00:00 2001 From: Patrick Delaunay Date: Fri, 31 Jul 2020 16:31:52 +0200 Subject: arm: stm32mp: stm32prog: use IS_ENABLED to prevent ifdef Use IS_ENABLED to prevent ifdef in stm32prog command. Signed-off-by: Patrick Delaunay Reviewed-by: Patrice Chotard --- arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c') diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c b/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c index cbf0120adcb..49dd25b28f4 100644 --- a/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c +++ b/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c @@ -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)); -- cgit v1.2.3