Skip to content

Commit

Permalink
V4L/DVB (6492): tuner: improve tuner_foo printk macros consistency
Browse files Browse the repository at this point in the history
Alter the tuner_foo printk macros to indicate which module is
generating the message.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Michael Krufky authored and Mauro Carvalho Chehab committed Jan 25, 2008
1 parent 4942744 commit 241020d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions drivers/media/video/tuner-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@

#define UNSET (-1U)

#define PREFIX "tuner "

/* standard i2c insmod options */
static unsigned short normal_i2c[] = {
#if defined(CONFIG_TUNER_TEA5761) || (defined(CONFIG_TUNER_TEA5761_MODULE) && defined(MODULE))
Expand Down
6 changes: 3 additions & 3 deletions drivers/media/video/tuner-driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ struct tuner {
/* ------------------------------------------------------------------------ */

#define tuner_warn(fmt, arg...) do {\
printk(KERN_WARNING "%s %d-%04x: " fmt, t->i2c->driver->driver.name, \
printk(KERN_WARNING PREFIX "%d-%04x: " fmt, \
i2c_adapter_id(t->i2c->adapter), t->i2c->addr , ##arg); } while (0)
#define tuner_info(fmt, arg...) do {\
printk(KERN_INFO "%s %d-%04x: " fmt, t->i2c->driver->driver.name, \
printk(KERN_INFO PREFIX "%d-%04x: " fmt, \
i2c_adapter_id(t->i2c->adapter), t->i2c->addr , ##arg); } while (0)
#define tuner_dbg(fmt, arg...) do {\
extern int tuner_debug; \
if (tuner_debug) \
printk(KERN_DEBUG "%s %d-%04x: " fmt, t->i2c->driver->driver.name, \
printk(KERN_DEBUG PREFIX "%d-%04x: " fmt, \
i2c_adapter_id(t->i2c->adapter), t->i2c->addr , ##arg); } while (0)

#endif /* __TUNER_DRIVER_H__ */
Expand Down

0 comments on commit 241020d

Please sign in to comment.