Staging: media: lirc: lirc_serial: replaced printk with pr_debug
Subsystems (2)
PATCH 1/1 Staging: media: lirc: lirc_serial: replaced printk with pr_debug
Replaced printk with pr_debug in dprintk
Signed-off-by Abel Moyo <[email protected]>
--- drivers/staging/media/lirc/lirc_serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/lirc/lirc_serial.c +1 -1
@@ -116,7 +116,7 @@ static bool txsense; /* 0 = active high, 1 = active low */ #define dprintk(fmt, args...) \ do { \ if (debug) \ - printk(KERN_DEBUG LIRC_DRIVER_NAME ": " \ + pr_debug(LIRC_DRIVER_NAME ": " \ fmt, ## args); \ } while (0)
Signature · 1 line
1.8.5.5
Em Fri, 21 Nov 2014 14:21:40 +0100
Abel Moyo <[email protected]> escreveu:
Quoted 12 lines
Replaced printk with
pr_debugin dprintkSigned-off-by Abel Moyo <[email protected]>--- drivers/staging/media/lirc/lirc_serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/media/lirc/lirc_serial.c +0
-0
drivers/staging/media/lirc/lirc_serial.c static bool txsense; /* 0 = active high, 1 = active low */ · line 122
Quoted 8 lines
drivers/staging/media/lirc/lirc_serial.c +1
-1@@ -116,7 +116,7 @@ static bool txsense; /* 0 = active high, 1 = active low */ #define dprintk(fmt, args...) \ do { \ if (debug) \ - printk(KERN_DEBUG LIRC_DRIVER_NAME ": " \ + pr_debug(LIRC_DRIVER_NAME ": " \ fmt, ## args); \ } while (0)
No, this is a bad idea. If dynamic_printk is enabled, in order to activate the debug messages, it would be required to enable debug modprobe parameter _and_ to enable each debug msg individually.
We should either use one or the other approach.
Regards,
Mauro