diff options
author | Mauro Carvalho Chehab <devnull@localhost> | 2006-01-09 17:17:32 +0000 |
---|---|---|
committer | Mauro Carvalho Chehab <devnull@localhost> | 2006-01-09 17:17:32 +0000 |
commit | 6807eba35cc91e109fed1df6038c424496cf2add (patch) | |
tree | 475351eb821b9e5a741faa5ba2f97e27cbf2e857 /linux/drivers/media/video/tvp5150.c | |
parent | 1faa3dcb3917ba99177697e1b8b4473e388744f8 (diff) | |
download | mediapointer-dvb-s2-6807eba35cc91e109fed1df6038c424496cf2add.tar.gz mediapointer-dvb-s2-6807eba35cc91e109fed1df6038c424496cf2add.tar.bz2 |
Several i2C cleanups to compile on both current linux and kernels >2.6.15
kernel-sync
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'linux/drivers/media/video/tvp5150.c')
-rw-r--r-- | linux/drivers/media/video/tvp5150.c | 20 |
1 files changed, 17 insertions, 3 deletions
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[] = { |