Commit 585e3227 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] dib3000mb: use pr_foo() instead of printk()

The dprintk() macro relies on continuation lines. This is not
a good practice and will break after commit 56387331
("Merge branch 'printk-cleanups'").

So, instead of directly calling printk(), use pr_foo() macros,
adding a \n leading char on each macro call.

The frontend settings also rely on continuation lines. Change
it to avoid the need of adding pr_cont() calls.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 4bd1a8dd
This diff is collapsed.
...@@ -13,20 +13,15 @@ ...@@ -13,20 +13,15 @@
#ifndef __DIB3000MB_PRIV_H_INCLUDED__ #ifndef __DIB3000MB_PRIV_H_INCLUDED__
#define __DIB3000MB_PRIV_H_INCLUDED__ #define __DIB3000MB_PRIV_H_INCLUDED__
/* info and err, taken from usb.h, if there is anything available like by default. */
#define err(format, arg...) printk(KERN_ERR "dib3000: " format "\n" , ## arg)
#define info(format, arg...) printk(KERN_INFO "dib3000: " format "\n" , ## arg)
#define warn(format, arg...) printk(KERN_WARNING "dib3000: " format "\n" , ## arg)
/* handy shortcuts */ /* handy shortcuts */
#define rd(reg) dib3000_read_reg(state,reg) #define rd(reg) dib3000_read_reg(state,reg)
#define wr(reg,val) if (dib3000_write_reg(state,reg,val)) \ #define wr(reg,val) if (dib3000_write_reg(state,reg,val)) \
{ err("while sending 0x%04x to 0x%04x.",val,reg); return -EREMOTEIO; } { pr_err("while sending 0x%04x to 0x%04x.", val, reg); return -EREMOTEIO; }
#define wr_foreach(a,v) { int i; \ #define wr_foreach(a,v) { int i; \
if (sizeof(a) != sizeof(v)) \ if (sizeof(a) != sizeof(v)) \
err("sizeof: %zu %zu is different",sizeof(a),sizeof(v));\ pr_err("sizeof: %zu %zu is different", sizeof(a), sizeof(v));\
for (i=0; i < sizeof(a)/sizeof(u16); i++) \ for (i=0; i < sizeof(a)/sizeof(u16); i++) \
wr(a[i],v[i]); \ wr(a[i],v[i]); \
} }
...@@ -37,8 +32,11 @@ ...@@ -37,8 +32,11 @@
/* debug */ /* debug */
#define dprintk(level,args...) \ #define dprintk(level, fmt, arg...) do { \
do { if ((debug & level)) { printk(args); } } while (0) if (debug & level) \
printk(KERN_DEBUG pr_fmt("%s: " fmt), \
__func__, ##arg); \
} while (0)
/* mask for enabling a specific pid for the pid_filter */ /* mask for enabling a specific pid for the pid_filter */
#define DIB3000_ACTIVATE_PID_FILTERING (0x2000) #define DIB3000_ACTIVATE_PID_FILTERING (0x2000)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment