From 6807eba35cc91e109fed1df6038c424496cf2add Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 9 Jan 2006 17:17:32 +0000 Subject: Several i2C cleanups to compile on both current linux and kernels >2.6.15 kernel-sync Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/tvp5150.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'linux/drivers/media/video/tvp5150.c') diff --git a/linux/drivers/media/video/tvp5150.c b/linux/drivers/media/video/tvp5150.c index 8dff50ff5..249be925a 100644 --- a/linux/drivers/media/video/tvp5150.c +++ b/linux/drivers/media/video/tvp5150.c @@ -40,15 +40,29 @@ static int debug = 0; module_param(debug, int, 0); MODULE_PARM_DESC(debug, "Debug level (0-1)"); +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) #define tvp5150_info(fmt, arg...) do { \ printk(KERN_INFO "%s %d-%04x: " fmt, c->driver->name, \ i2c_adapter_id(c->adapter), c->addr , ## arg); } while (0) #define tvp5150_dbg(num, fmt, arg...) \ do { \ if (debug >= num) \ - printk(KERN_DEBUG "%s debug %d-%04x: " fmt, c->driver->name, \ - i2c_adapter_id(c->adapter), c->addr , ## arg); \ - } while (0) + printk(KERN_DEBUG "%s debug %d-%04x: " fmt,\ + c->driver->name, \ + i2c_adapter_id(c->adapter), \ + c->addr , ## arg); } while (0) +#else +#define tvp5150_info(fmt, arg...) do { \ + printk(KERN_INFO "%s %d-%04x: " fmt, c->driver->driver.name, \ + i2c_adapter_id(c->adapter), c->addr , ## arg); } while (0) +#define tvp5150_dbg(num, fmt, arg...) \ + do { \ + if (debug >= num) \ + printk(KERN_DEBUG "%s debug %d-%04x: " fmt,\ + c->driver->driver.name, \ + i2c_adapter_id(c->adapter), \ + c->addr , ## arg); } while (0) +#endif /* supported controls */ static struct v4l2_queryctrl tvp5150_qctrl[] = { -- cgit v1.2.3