summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <devnull@localhost>2006-01-09 17:17:32 +0000
committerMauro Carvalho Chehab <devnull@localhost>2006-01-09 17:17:32 +0000
commit6807eba35cc91e109fed1df6038c424496cf2add (patch)
tree475351eb821b9e5a741faa5ba2f97e27cbf2e857 /linux
parent1faa3dcb3917ba99177697e1b8b4473e388744f8 (diff)
downloadmediapointer-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')
-rw-r--r--linux/drivers/media/dvb/cinergyT2/cinergyT2.c10
-rw-r--r--linux/drivers/media/dvb/ttpci/budget.h5
-rw-r--r--linux/drivers/media/video/bt832.c9
-rw-r--r--linux/drivers/media/video/bttv-i2c.c22
-rw-r--r--linux/drivers/media/video/cx88/Kconfig19
-rw-r--r--linux/drivers/media/video/tda7432.c21
-rw-r--r--linux/drivers/media/video/tda9875.c44
-rw-r--r--linux/drivers/media/video/tuner-core.c4
-rw-r--r--linux/drivers/media/video/tvp5150.c20
-rw-r--r--linux/include/linux/i2c-id.h20
-rw-r--r--linux/include/media/saa7146.h10
11 files changed, 94 insertions, 90 deletions
diff --git a/linux/drivers/media/dvb/cinergyT2/cinergyT2.c b/linux/drivers/media/dvb/cinergyT2/cinergyT2.c
index 47b21f54d..ec1f39f1d 100644
--- a/linux/drivers/media/dvb/cinergyT2/cinergyT2.c
+++ b/linux/drivers/media/dvb/cinergyT2/cinergyT2.c
@@ -58,6 +58,7 @@ static int debug;
module_param_named(debug, debug, int, 0644);
MODULE_PARM_DESC(debug, "Turn on/off debugging (default:off).");
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
#define dprintk(level, args...) \
do { \
if ((debug & level)) { \
@@ -65,6 +66,15 @@ do { \
__FUNCTION__); \
printk(args); } \
} while (0)
+#else
+#define dprintk(level, args...) \
+do { \
+ if ((debug & level)) { \
+ printk("%s: %s(): ", KBUILD_MODNAME, \
+ __FUNCTION__); \
+ printk(args); } \
+} while (0)
+#endif
enum cinergyt2_ep1_cmd {
CINERGYT2_EP1_PID_TABLE_RESET = 0x01,
diff --git a/linux/drivers/media/dvb/ttpci/budget.h b/linux/drivers/media/dvb/ttpci/budget.h
index fdaa3318a..bff68210a 100644
--- a/linux/drivers/media/dvb/ttpci/budget.h
+++ b/linux/drivers/media/dvb/ttpci/budget.h
@@ -18,8 +18,13 @@ extern int budget_debug;
#undef dprintk
#endif
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
#define dprintk(level,args...) \
do { if ((budget_debug & level)) { printk("%s: %s(): ",__stringify(KBUILD_MODNAME), __FUNCTION__); printk(args); } } while (0)
+#else
+#define dprintk(level,args...) \
+ do { if ((budget_debug & level)) { printk("%s: %s(): ", KBUILD_MODNAME, __FUNCTION__); printk(args); } } while (0)
+#endif
struct budget_info {
char *name;
diff --git a/linux/drivers/media/video/bt832.c b/linux/drivers/media/video/bt832.c
index 589afb41b..995278a31 100644
--- a/linux/drivers/media/video/bt832.c
+++ b/linux/drivers/media/video/bt832.c
@@ -26,6 +26,7 @@
#include <linux/kernel.h>
#include <linux/i2c.h>
#include <linux/types.h>
+#include "compat.h"
#include <linux/videodev.h>
#include <linux/init.h>
#include <linux/errno.h>
@@ -198,7 +199,7 @@ static int bt832_attach(struct i2c_adapter *adap, int addr,
i2c_set_clientdata(&t->client, t);
i2c_attach_client(&t->client);
- v4l_info(t->client,"chip found @ 0x%x\n", addr<<1);
+ v4l_info(&t->client,"chip found @ 0x%x\n", addr<<1);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
@@ -228,7 +229,7 @@ static int bt832_detach(struct i2c_client *client)
{
struct bt832 *t = i2c_get_clientdata(client);
- v4l_info(t->client,"dettach\n");
+ v4l_info(&t->client,"dettach\n");
i2c_detach_client(client);
kfree(t);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
@@ -243,7 +244,7 @@ bt832_command(struct i2c_client *client, unsigned int cmd, void *arg)
struct bt832 *t = i2c_get_clientdata(client);
if (debug>1)
- v4l_i2c_print_ioctl(t->client,cmd);
+ v4l_i2c_print_ioctl(&t->client,cmd);
switch (cmd) {
case BT832_HEXDUMP: {
@@ -254,7 +255,7 @@ bt832_command(struct i2c_client *client, unsigned int cmd, void *arg)
}
break;
case BT832_REATTACH:
- v4l_info(t->client,"re-attach\n");
+ v4l_info(&t->client,"re-attach\n");
i2c_del_driver(&driver);
i2c_add_driver(&driver);
break;
diff --git a/linux/drivers/media/video/bttv-i2c.c b/linux/drivers/media/video/bttv-i2c.c
index af2ce2d28..fda9f34ea 100644
--- a/linux/drivers/media/video/bttv-i2c.c
+++ b/linux/drivers/media/video/bttv-i2c.c
@@ -1,5 +1,5 @@
/*
- $Id: bttv-i2c.c,v 1.40 2006/01/08 12:05:34 mchehab Exp $
+ $Id: bttv-i2c.c,v 1.41 2006/01/09 17:17:32 mchehab Exp $
bttv-i2c.c -- all the i2c code is here
@@ -108,19 +108,13 @@ static struct i2c_algo_bit_data bttv_i2c_algo_bit_template = {
};
static struct i2c_adapter bttv_i2c_adap_sw_template = {
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))&&(LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15))
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
.owner = THIS_MODULE,
#endif
#ifdef I2C_CLASS_TV_ANALOG
.class = I2C_CLASS_TV_ANALOG,
#endif
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- .name = "bt878",
-#else
- .driver = {
- .name = "bt878",
- },
-#endif
+ .name = "bttv",
.id = I2C_HW_B_BT848,
.client_register = attach_inform,
};
@@ -287,19 +281,13 @@ static struct i2c_algorithm bttv_algo = {
};
static struct i2c_adapter bttv_i2c_adap_hw_template = {
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))&&(LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15))
- .owner = THIS_MODULE,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+ .owner = THIS_MODULE,
#endif
#ifdef I2C_CLASS_TV_ANALOG
.class = I2C_CLASS_TV_ANALOG,
#endif
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
.name = "bt878",
-#else
- .driver = {
- .name = "bt878",
- },
-#endif
.id = I2C_HW_B_BT848 /* FIXME */,
.algo = &bttv_algo,
.client_register = attach_inform,
diff --git a/linux/drivers/media/video/cx88/Kconfig b/linux/drivers/media/video/cx88/Kconfig
index 136c49c3c..76fcb4e99 100644
--- a/linux/drivers/media/video/cx88/Kconfig
+++ b/linux/drivers/media/video/cx88/Kconfig
@@ -31,7 +31,7 @@ config VIDEO_CX88_DVB
config VIDEO_CX88_ALSA
tristate "ALSA DMA audio support"
- depends on VIDEO_CX88_DVB && SND
+ depends on VIDEO_CX88 && SND
select SND_PCM_OSS
---help---
This is a video4linux driver for direct (DMA) audio on
@@ -42,22 +42,7 @@ config VIDEO_CX88_ALSA
PCI device.
To compile this driver as a module, choose M here: the
- module will be called saa7134-alsa.
-
-config VIDEO_CX88_ALSA
- tristate "ALSA DMA audio support"
- depends on VIDEO_CX88_DVB && SND
- select SND_PCM_OSS
- ---help---
- This is a video4linux driver for direct (DMA) audio on
- Conexant 2388x based TV cards.
- It only works with boards with function 01 enabled.
- To check if your board supports, use lspci -n.
- If supported, you should see 1471:8801 or 1471:8811
- PCI device.
-
- To compile this driver as a module, choose M here: the
- module will be called saa7134-alsa.
+ module will be called cx88-alsa.
config VIDEO_CX88_DVB_ALL_FRONTENDS
bool "Build all supported frontends for cx2388x based TV cards"
diff --git a/linux/drivers/media/video/tda7432.c b/linux/drivers/media/video/tda7432.c
index 7e050b5b5..3332d48b3 100644
--- a/linux/drivers/media/video/tda7432.c
+++ b/linux/drivers/media/video/tda7432.c
@@ -44,18 +44,18 @@
#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/slab.h>
+#include "compat.h"
#include <linux/videodev.h>
#include <linux/i2c.h>
#include <linux/i2c-algo-bit.h>
#include "bttv.h"
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-#include "audiochip.h"
-#include "id.h"
#include "i2c-compat.h"
#else
-#include <media/audiochip.h>
#endif
+#include <media/audiochip.h>
+#include <media/v4l2-common.h>
#ifndef VIDEO_AUDIO_BALANCE
# define VIDEO_AUDIO_BALANCE 32
@@ -340,7 +340,7 @@ static int tda7432_attach(struct i2c_adapter *adap, int addr,
#endif
i2c_attach_client(client);
- v4l_info(client, "chip found @ 0x%x (%s)\n", address << 1, adapter->name);
+ v4l_info(client, "chip found @ 0x%x (%s)\n", addr << 1, adap->name);
return 0;
}
@@ -374,7 +374,9 @@ static int tda7432_command(struct i2c_client *client,
unsigned int cmd, void *arg)
{
struct tda7432 *t = i2c_get_clientdata(client);
- d2printk("tda7432: In tda7432_command\n");
+ v4l_dbg(2,client,"In tda7432_command\n");
+ if (debug>1)
+ v4l_i2c_print_ioctl(client,cmd);
switch (cmd) {
/* --- v4l ioctls --- */
@@ -385,7 +387,6 @@ static int tda7432_command(struct i2c_client *client,
case VIDIOCGAUDIO:
{
struct video_audio *va = arg;
- dprintk("tda7432: VIDIOCGAUDIO\n");
va->flags |= VIDEO_AUDIO_VOLUME |
VIDEO_AUDIO_BASS |
@@ -440,7 +441,6 @@ static int tda7432_command(struct i2c_client *client,
case VIDIOCSAUDIO:
{
struct video_audio *va = arg;
- dprintk("tda7432: VIDEOCSAUDIO\n");
if(va->flags & VIDEO_AUDIO_VOLUME){
if(!maxvol){ /* max +20db */
@@ -516,11 +516,6 @@ static int tda7432_command(struct i2c_client *client,
} /* end of VIDEOCSAUDIO case */
- default: /* Not VIDEOCGAUDIO or VIDEOCSAUDIO */
-
- /* nothing */
- d2printk("tda7432: Default\n");
-
} /* end of (cmd) switch */
return 0;
@@ -553,7 +548,7 @@ static struct i2c_client client_template =
static int __init tda7432_init(void)
{
if ( (loudness < 0) || (loudness > 15) ) {
- printk(KERN_ERR "tda7432: loudness parameter must be between 0 and 15\n");
+ printk(KERN_ERR "loudness parameter must be between 0 and 15\n");
return -EINVAL;
}
diff --git a/linux/drivers/media/video/tda9875.c b/linux/drivers/media/video/tda9875.c
index f71784720..499f0e0c2 100644
--- a/linux/drivers/media/video/tda9875.c
+++ b/linux/drivers/media/video/tda9875.c
@@ -25,6 +25,7 @@
#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/slab.h>
+#include "compat.h"
#include <linux/videodev.h>
#include <linux/i2c.h>
#include <linux/i2c-algo-bit.h>
@@ -38,6 +39,7 @@
#else
#include <media/audiochip.h>
#endif
+#include <media/v4l2-common.h>
static int debug; /* insmod parameter */
module_param(debug, int, S_IRUGO | S_IWUSR);
@@ -62,6 +64,8 @@ struct tda9875 {
static struct i2c_driver driver;
static struct i2c_client client_template;
+#define dprintk if (debug) printk
+
/* The TDA9875 is made by Philips Semiconductor
* http://www.semiconductors.philips.com
* TDA9875: I2C-bus controlled DSP audio processor, FM demodulator
@@ -114,12 +118,12 @@ static struct i2c_client client_template;
static int tda9875_write(struct i2c_client *client, int subaddr, unsigned char val)
{
unsigned char buffer[2];
- v4l_dbg(2,client,"In tda9875_write\n");
- v4l_dbg(1,client,"Writing %d 0x%x\n", subaddr, val);
+ dprintk("In tda9875_write\n");
+ dprintk("Writing %d 0x%x\n", subaddr, val);
buffer[0] = subaddr;
buffer[1] = val;
if (2 != i2c_master_send(client,buffer,2)) {
- v4l_err(client,"I/O error, trying (write %d 0x%x)\n",
+ printk(KERN_WARNING "tda9875: I/O error, trying (write %d 0x%x)\n",
subaddr, val);
return -1;
}
@@ -151,10 +155,10 @@ static int i2c_read_register(struct i2c_adapter *adap, int addr, int reg)
write[0] = reg;
if (2 != i2c_transfer(adap,msgs,2)) {
- v4l_err(client,"I/O error (read2)\n");
+ printk(KERN_WARNING "tda9875: I/O error (read2)\n");
return -1;
}
- v4l_dbg(1,client,"chip_read2: reg%d=0x%x\n",reg,read[0]);
+ dprintk("tda9875: chip_read2: reg%d=0x%x\n",reg,read[0]);
return read[0];
}
@@ -163,7 +167,7 @@ static void tda9875_set(struct i2c_client *client)
struct tda9875 *tda = i2c_get_clientdata(client);
unsigned char a;
- v4l_dbg(1,client,"tda9875_set(%04x,%04x,%04x,%04x)\n",
+ dprintk(KERN_DEBUG "tda9875_set(%04x,%04x,%04x,%04x)\n",
tda->lvol,tda->rvol,tda->bass,tda->treble);
@@ -180,7 +184,7 @@ static void tda9875_set(struct i2c_client *client)
static void do_tda9875_init(struct i2c_client *client)
{
struct tda9875 *t = i2c_get_clientdata(client);
- v4l_dbg(2,client,"In tda9875_init\n");
+ dprintk("In tda9875_init\n");
tda9875_write(client, TDA9875_CFG, 0xd0 ); /*reg de config 0 (reset)*/
tda9875_write(client, TDA9875_MSR, 0x03 ); /* Monitor 0b00000XXX*/
tda9875_write(client, TDA9875_C1MSB, 0x00 ); /*Car1(FM) MSB XMHz*/
@@ -235,11 +239,11 @@ static int tda9875_checkit(struct i2c_adapter *adap, int addr)
rev=i2c_read_register(adap,addr,255);
if(dic==0 || dic==2) { // tda9875 and tda9875A
- v4l_info(client,"TDA9875%s Rev.%d detected at 0x%x\n",
+ printk("tda9875: TDA9875%s Rev.%d detected at 0x%x\n",
dic==0?"":"A", rev,addr<<1);
return 1;
}
- v4l_err(client,"no such chip at 0x%x (dic=0x%x rev=0x%x)\n",addr<<1,dic,rev);
+ printk("tda9875: no such chip at 0x%x (dic=0x%x rev=0x%x)\n",addr<<1,dic,rev);
return(0);
}
@@ -252,6 +256,7 @@ static int tda9875_attach(struct i2c_adapter *adap, int addr,
{
struct tda9875 *t;
struct i2c_client *client;
+ dprintk("In tda9875_attach\n");
t = kmalloc(sizeof *t,GFP_KERNEL);
if (!t)
@@ -275,7 +280,7 @@ static int tda9875_attach(struct i2c_adapter *adap, int addr,
#endif
i2c_attach_client(client);
- v4l_info(client, "chip found @ 0x%x (%s)\n", address << 1, adapter->name);
+ printk(KERN_INFO "tda9875: init\n");
return 0;
}
@@ -310,9 +315,8 @@ static int tda9875_command(struct i2c_client *client,
{
struct tda9875 *t = i2c_get_clientdata(client);
- v4l_dbg(2,client,"In tda9875_command...\n");
- if (debug>1)
- v4l_i2c_print_ioctl(client,cmd);
+ dprintk("In tda9875_command...\n");
+
switch (cmd) {
/* --- v4l ioctls --- */
/* take care: bttv does userspace copying, we'll get a
@@ -322,6 +326,8 @@ static int tda9875_command(struct i2c_client *client,
struct video_audio *va = arg;
int left,right;
+ dprintk("VIDIOCGAUDIO\n");
+
va->flags |= VIDEO_AUDIO_VOLUME |
VIDEO_AUDIO_BASS |
VIDEO_AUDIO_TREBLE;
@@ -346,6 +352,7 @@ static int tda9875_command(struct i2c_client *client,
struct video_audio *va = arg;
int left,right;
+ dprintk("VIDEOCSAUDIO...\n");
left = (min(65536 - va->balance,32768) *
va->volume) / 32768;
right = (min(va->balance,(__u16)32768) *
@@ -374,8 +381,10 @@ static int tda9875_command(struct i2c_client *client,
if (t->treble < -12)
t->treble = -12 & 0xff;
- v4l_dbg(2,"bal:%04x vol:%04x bass:%04x treble:%04x\n",
- va->balance,va->volume,va->bass,va->treble);
+
+
+//printk("tda9875 bal:%04x vol:%04x bass:%04x treble:%04x\n",va->balance,va->volume,va->bass,va->treble);
+
tda9875_set(client);
@@ -383,6 +392,11 @@ static int tda9875_command(struct i2c_client *client,
} /* end of VIDEOCSAUDIO case */
+ default: /* Not VIDEOCGAUDIO or VIDEOCSAUDIO */
+
+ /* nothing */
+ dprintk("Default\n");
+
} /* end of (cmd) switch */
return 0;
diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c
index 5a49737eb..346d15466 100644
--- a/linux/drivers/media/video/tuner-core.c
+++ b/linux/drivers/media/video/tuner-core.c
@@ -1,5 +1,5 @@
/*
- * $Id: tuner-core.c,v 1.95 2006/01/08 12:05:34 mchehab Exp $
+ * $Id: tuner-core.c,v 1.96 2006/01/09 17:17:32 mchehab Exp $
*
* i2c tv tuner chip device driver
* core core, i.e. kernel interfaces, registering and so on
@@ -884,7 +884,9 @@ static struct i2c_driver driver = {
};
static struct i2c_client client_template = {
.name = "(tuner unset)",
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
.flags = I2C_CLIENT_ALLOW_USE,
+#endif
.driver = &driver,
};
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[] = {
diff --git a/linux/include/linux/i2c-id.h b/linux/include/linux/i2c-id.h
index c4564a283..6ff2d3658 100644
--- a/linux/include/linux/i2c-id.h
+++ b/linux/include/linux/i2c-id.h
@@ -25,12 +25,6 @@
/*
* ---- Driver types -----------------------------------------------------
- * device id name + number function description, i2c address(es)
- *
- * Range 1000-1999 range is defined in sensors/sensors.h
- * Range 0x100 - 0x1ff is for V4L2 Common Components
- * Range 0xf000 - 0xffff is reserved for local experimentation, and should
- * never be used in official drivers
*/
#define I2C_DRIVERID_MSP3400 1
@@ -111,13 +105,7 @@
#define I2C_DRIVERID_INFRARED 75 /* I2C InfraRed on Video boards */
#define I2C_DRIVERID_TVP5150 76 /* TVP5150 video decoder */
-#define I2C_DRIVERID_EXP0 0xF0 /* experimental use id's */
-#define I2C_DRIVERID_EXP1 0xF1
-#define I2C_DRIVERID_EXP2 0xF2
-#define I2C_DRIVERID_EXP3 0xF3
-
#define I2C_DRIVERID_I2CDEV 900
-#define I2C_DRIVERID_I2CPROC 901
#define I2C_DRIVERID_ARP 902 /* SMBus ARP Client */
#define I2C_DRIVERID_ALERT 903 /* SMBus Alert Responder Client */
@@ -132,15 +120,12 @@
#define I2C_DRIVERID_ADM1021 1008
#define I2C_DRIVERID_ADM9240 1009
#define I2C_DRIVERID_LTC1710 1010
-#define I2C_DRIVERID_SIS5595 1011
#define I2C_DRIVERID_ICSPLL 1012
#define I2C_DRIVERID_BT869 1013
#define I2C_DRIVERID_MAXILIFE 1014
#define I2C_DRIVERID_MATORB 1015
#define I2C_DRIVERID_GL520 1016
#define I2C_DRIVERID_THMC50 1017
-#define I2C_DRIVERID_DDCMON 1018
-#define I2C_DRIVERID_VIA686A 1019
#define I2C_DRIVERID_ADM1025 1020
#define I2C_DRIVERID_LM87 1021
#define I2C_DRIVERID_PCF8574 1022
@@ -152,21 +137,16 @@
#define I2C_DRIVERID_FSCPOS 1028
#define I2C_DRIVERID_FSCSCY 1029
#define I2C_DRIVERID_PCF8591 1030
-#define I2C_DRIVERID_SMSC47M1 1031
-#define I2C_DRIVERID_VT1211 1032
#define I2C_DRIVERID_LM92 1033
-#define I2C_DRIVERID_VT8231 1034
#define I2C_DRIVERID_SMARTBATT 1035
#define I2C_DRIVERID_BMCSENSORS 1036
#define I2C_DRIVERID_FS451 1037
-#define I2C_DRIVERID_W83627HF 1038
#define I2C_DRIVERID_LM85 1039
#define I2C_DRIVERID_LM83 1040
#define I2C_DRIVERID_LM90 1042
#define I2C_DRIVERID_ASB100 1043
#define I2C_DRIVERID_FSCHER 1046
#define I2C_DRIVERID_W83L785TS 1047
-#define I2C_DRIVERID_SMSC47B397 1050
/*
* ---- Adapter types ----------------------------------------------------
diff --git a/linux/include/media/saa7146.h b/linux/include/media/saa7146.h
index e5be2b9b8..760ae6324 100644
--- a/linux/include/media/saa7146.h
+++ b/linux/include/media/saa7146.h
@@ -13,6 +13,7 @@
#include <linux/stringify.h>
#include <linux/vmalloc.h> /* for vmalloc() */
#include <linux/mm.h> /* for vmalloc_to_page() */
+#include "compat.h"
#define SAA7146_VERSION_CODE 0x000500 /* 0.5.0 */
@@ -21,14 +22,23 @@
extern unsigned int saa7146_debug;
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
//#define DEBUG_PROLOG printk("(0x%08x)(0x%08x) %s: %s(): ",(dev==0?-1:(dev->mem==0?-1:saa7146_read(dev,RPS_ADDR0))),(dev==0?-1:(dev->mem==0?-1:saa7146_read(dev,IER))),__stringify(KBUILD_MODNAME),__FUNCTION__)
+#else
+//#define DEBUG_PROLOG printk("(0x%08x)(0x%08x) %s: %s(): ",(dev==0?-1:(dev->mem==0?-1:saa7146_read(dev,RPS_ADDR0))),(dev==0?-1:(dev->mem==0?-1:saa7146_read(dev,IER))),KBUILD_MODNAME,__FUNCTION__)
+#endif
#ifndef DEBUG_VARIABLE
#define DEBUG_VARIABLE saa7146_debug
#endif
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
#define DEBUG_PROLOG printk("%s: %s(): ",__stringify(KBUILD_MODNAME),__FUNCTION__)
#define INFO(x) { printk("%s: ",__stringify(KBUILD_MODNAME)); printk x; }
+#else
+#define DEBUG_PROLOG printk("%s: %s(): ",KBUILD_MODNAME,__FUNCTION__)
+#define INFO(x) { printk("%s: ",KBUILD_MODNAME); printk x; }
+#endif
#define ERR(x) { DEBUG_PROLOG; printk x; }