From 871e1d0545436f7c21b1b103601e1fe3920a6e4c Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Thu, 1 Nov 2012 16:28:33 +0000 Subject: [PATCH] staging: comedi: gsc_hpdi: change DEBUG_PRINT() Change the `DEBUG_PRINT(format, args...)` macro used by this module to use either `pr_debug()` (if macro `HPDI_DEBUG` is defined) or `no_printk()` instead of `printk()` or nothing. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/gsc_hpdi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/gsc_hpdi.c b/drivers/staging/comedi/drivers/gsc_hpdi.c index 4f829b666fe5..c056c259ddb5 100644 --- a/drivers/staging/comedi/drivers/gsc_hpdi.c +++ b/drivers/staging/comedi/drivers/gsc_hpdi.c @@ -45,6 +45,8 @@ support could be added to this driver. */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include #include "../comedidev.h" #include @@ -64,9 +66,9 @@ static int dio_config_block_size(struct comedi_device *dev, unsigned int *data); /* #define HPDI_DEBUG enable debugging code */ #ifdef HPDI_DEBUG -#define DEBUG_PRINT(format, args...) printk(format , ## args) +#define DEBUG_PRINT(format, args...) pr_debug(format , ## args) #else -#define DEBUG_PRINT(format, args...) +#define DEBUG_PRINT(format, args...) no_printk(pr_fmt(format), ## args) #endif #define TIMER_BASE 50 /* 20MHz master clock */ -- 2.30.2