diff mbox

Staging: media: lirc: lirc_serial: replaced printk with pr_debug

Message ID 20141121132137.GA23740@gentoodev.infor.com (mailing list archive)
State New, archived
Headers show

Commit Message

Abel Moyo Nov. 21, 2014, 1:21 p.m. UTC
Replaced printk with pr_debug in dprintk

Signed-off-by: Abel Moyo <abelmoyo.ab@gmail.com>
---
 drivers/staging/media/lirc/lirc_serial.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mauro Carvalho Chehab Nov. 25, 2014, 11:50 a.m. UTC | #1
Em Fri, 21 Nov 2014 14:21:40 +0100
Abel Moyo <abelmoyo.ab@gmail.com> escreveu:

> Replaced printk with pr_debug in dprintk
> 
> Signed-off-by: Abel Moyo <abelmoyo.ab@gmail.com>
> ---
>  drivers/staging/media/lirc/lirc_serial.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/media/lirc/lirc_serial.c b/drivers/staging/media/lirc/lirc_serial.c
> index 181b92b..86c5274 100644
> --- a/drivers/staging/media/lirc/lirc_serial.c
> +++ b/drivers/staging/media/lirc/lirc_serial.c
> @@ -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
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/staging/media/lirc/lirc_serial.c b/drivers/staging/media/lirc/lirc_serial.c
index 181b92b..86c5274 100644
--- a/drivers/staging/media/lirc/lirc_serial.c
+++ b/drivers/staging/media/lirc/lirc_serial.c
@@ -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)