From 038a10c51af779688d9232b546b602e5c5cc8e05 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Tue, 30 Oct 2007 08:46:10 -0400 Subject: tuner: improve tuner_foo printk macros consistency From: Michael Krufky Alter the tuner_foo printk macros to indicate which module is generating the message. Signed-off-by: Michael Krufky --- linux/drivers/media/video/tuner-core.c | 2 ++ linux/drivers/media/video/tuner-driver.h | 12 ++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c index 30aa1f48d..1f116878d 100644 --- a/linux/drivers/media/video/tuner-core.c +++ b/linux/drivers/media/video/tuner-core.c @@ -34,6 +34,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)) diff --git a/linux/drivers/media/video/tuner-driver.h b/linux/drivers/media/video/tuner-driver.h index d5acacebd..502c88dab 100644 --- a/linux/drivers/media/video/tuner-driver.h +++ b/linux/drivers/media/video/tuner-driver.h @@ -72,27 +72,27 @@ struct tuner { #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) #define tuner_warn(fmt, arg...) do {\ - printk(KERN_WARNING "%s %d-%04x: " fmt, t->i2c->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->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->name, \ + printk(KERN_DEBUG PREFIX "%d-%04x: " fmt, \ i2c_adapter_id(t->i2c->adapter), t->i2c->addr , ##arg); } while (0) #else #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 -- cgit v1.2.3