OSDN Git Service

[media] lbdt3306a: rework at printk macros
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 28 Oct 2014 13:35:16 +0000 (11:35 -0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 3 Mar 2015 13:34:13 +0000 (10:34 -0300)
commit097117cab5041cdd85aafc2a8af1113cbdf65e27
treea1dae2c56bd81efc80649c9f96133cfb548cfb53
parente2c47fa7dd4b38d930fe4131e65f0fa35236c9b5
[media] lbdt3306a: rework at printk macros

Use pr_foo() where there's a direct replacement. For debug, use
custom-made macros, for now, as there are 3 different debug levels.

We should get rid of those some day, specially since several such
macros can be just removed, as Kernel trace would provide about
the same output.

This gets rid of some checkpatch errors:

WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...
+#define lg_info(fmt, arg...) printk(KERN_INFO "lgdt3306a: " fmt, ##arg)

ERROR: Macros with complex values should be enclosed in parentheses
+#define lg_dbg(fmt, arg...) if (debug & DBG_INFO) \
+ lg_printk(KERN_DEBUG,         fmt, ##arg)

ERROR: Macros with complex values should be enclosed in parentheses
+#define lg_reg(fmt, arg...) if (debug & DBG_REG) \
+ lg_printk(KERN_DEBUG,         fmt, ##arg)

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/dvb-frontends/lgdt3306a.c