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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux