lkml.org 
[lkml]   [2018]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH v2 15/15] staging: fbtft: Replaces custom debug macro with dev_dbg().
Changes custom macro to dev_dbg to avoid parameter multiple usage and use of typeof().

Signed-off-by: Leonardo Brás <leobras.c@gmail.com>
---
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
\
 
 \ /
  Last update: 2018-08-08 02:31    [W:0.100 / U:0.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site