[PATCH v2 15/15] staging: fbtft: Replaces custom debug macro with dev_dbg().

From: Leonardo BrÃs
Date: Tue Aug 07 2018 - 20:30:17 EST


Changes custom macro to dev_dbg to avoid parameter multiple usage and use of typeof().

Signed-off-by: Leonardo BrÃs <leobras.c@xxxxxxxxx>
---
drivers/staging/fbtft/fbtft.h | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h
index 2b2988d2f73e..0699c164b0d4 100644
--- a/drivers/staging/fbtft/fbtft.h
+++ b/drivers/staging/fbtft/fbtft.h
@@ -407,22 +407,15 @@ module_exit(fbtft_driver_module_exit)
#define DEBUG_REQUEST_GPIOS_MATCH BIT(30)
#define DEBUG_VERIFY_GPIOS BIT(31)

-#define fbtft_init_dbg(dev, format, arg...) \
-do { \
- if (unlikely((dev)->platform_data && \
- (((struct fbtft_platform_data *)(dev)->platform_data)->display.debug & DEBUG_DRIVER_INIT_FUNCTIONS))) \
- dev_info(dev, format, ##arg); \
-} while (0)
+#define fbtft_init_dbg(dev, format, arg...) \
+ dev_dbg(dev, format, ##arg)

-#define fbtft_par_dbg(level, par, format, arg...) \
-do { \
- if (unlikely(par->debug & level)) \
- dev_info(par->info->device, format, ##arg); \
-} while (0)
+#define fbtft_par_dbg(level, par, format, arg...) \
+ dev_dbg(par->info->device, format, ##arg)

#define fbtft_par_dbg_hex(level, par, dev, type, buf, num, format, arg...) \
do { \
- if (unlikely((par)->debug & (level))) \
+ if (unlikely((par)->debug & (level))) \
fbtft_dbg_hex(dev, sizeof(type), buf,\
(num) * sizeof(type), format, ##arg); \
} while (0)
--
2.18.0