summaryrefslogtreecommitdiff
path: root/drivers/media/dvb-core/dvb_frontend.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2016-10-13 06:47:54 -0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-10-21 08:41:19 -0200
commitb3ad24d2e0b039834db28d06727dc9a675aa0396 (patch)
tree4f582b16541dcbe679aec046e1440a0cdd7cc2b4 /drivers/media/dvb-core/dvb_frontend.c
parente428744a9fa18a3e114fcd420d8263f8a3e274b3 (diff)
[media] dvb-core: use pr_foo() instead of printk()
The dvb-core directly calls printk() without using the modern printk macros, or using the proper printk levels. Change it to use pr_foo(). Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/dvb-core/dvb_frontend.c')
-rw-r--r--drivers/media/dvb-core/dvb_frontend.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c
index 01511e5a5566..98edf46b22d0 100644
--- a/drivers/media/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb-core/dvb_frontend.c
@@ -28,6 +28,8 @@
/* Enables DVBv3 compatibility bits at the headers */
#define __DVB_CORE__
+#define pr_fmt(fmt) "dvb_frontend: " fmt
+
#include <linux/string.h>
#include <linux/kernel.h>
#include <linux/sched.h>
@@ -67,6 +69,9 @@ MODULE_PARM_DESC(dvb_powerdown_on_sleep, "0: do not power down, 1: turn LNB volt
module_param(dvb_mfe_wait_time, int, 0644);
MODULE_PARM_DESC(dvb_mfe_wait_time, "Wait up to <mfe_wait_time> seconds on open() for multi-frontend to become available (default:5 seconds)");
+#define dprintk(fmt, arg...) \
+ printk(KERN_DEBUG pr_fmt("%s: " fmt), __func__, ##arg)
+
#define FESTATE_IDLE 1
#define FESTATE_RETUNE 2
#define FESTATE_TUNING_FAST 4
@@ -2356,7 +2361,8 @@ static int dvb_frontend_ioctl_legacy(struct file *file,
int i;
u8 last = 1;
if (dvb_frontend_debug)
- printk("%s switch command: 0x%04lx\n", __func__, swcmd);
+ dprintk("%s switch command: 0x%04lx\n",
+ __func__, swcmd);
nexttime = ktime_get_boottime();
if (dvb_frontend_debug)
tv[0] = nexttime;
@@ -2379,10 +2385,10 @@ static int dvb_frontend_ioctl_legacy(struct file *file,
dvb_frontend_sleep_until(&nexttime, 8000);
}
if (dvb_frontend_debug) {
- printk("%s(%d): switch delay (should be 32k followed by all 8k\n",
+ dprintk("%s(%d): switch delay (should be 32k followed by all 8k)\n",
__func__, fe->dvb->num);
for (i = 1; i < 10; i++)
- printk("%d: %d\n", i,
+ pr_info("%d: %d\n", i,
(int) ktime_us_delta(tv[i], tv[i-1]));
}
err = 0;