From 8c748f2d23a18939ce9056fa53a6bebcef8612f6 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Sat, 5 Dec 2020 07:48:18 +0900 Subject: [PATCH] drivers/video/ov2640.c: Avoid assuming debug macro expansion --- drivers/video/ov2640.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/video/ov2640.c b/drivers/video/ov2640.c index 52fc83f02d..bb3e4f2a96 100644 --- a/drivers/video/ov2640.c +++ b/drivers/video/ov2640.c @@ -860,12 +860,16 @@ static int ovr2640_chipid(FAR struct i2c_master_s *i2c) if (pidl != OVR2640_PRODUCT_IDL || pidh != OVR2640_PRODUCT_IDH) { +#ifdef CONFIG_DEBUG_GRAPHICS gerr("ERROR: Unsupported PID=%02x$02x MID=%02x%02x\n", pidh, pidl, midh, midl); +#endif return -ENOSYS; } +#ifdef CONFIG_DEBUG_GRAPHICS ginfo("PID=%02x$02x MID=%02x%02x\n", pidh, pidl, midh, midl); +#endif return OK; }