summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux/drivers/media/video/cx88/cx88-core.c16
-rw-r--r--linux/drivers/media/video/cx88/cx88-video.c15
-rw-r--r--linux/drivers/media/video/cx88/cx88.h4
-rw-r--r--linux/drivers/media/video/msp3400-driver.c2
-rw-r--r--linux/drivers/media/video/msp3400.c2
-rw-r--r--linux/drivers/media/video/saa6752hs.c2
-rw-r--r--linux/drivers/media/video/saa7134/saa6752hs.c2
-rw-r--r--linux/drivers/media/video/tda9887.c2
-rw-r--r--linux/drivers/media/video/tuner-core.c23
-rw-r--r--linux/drivers/media/video/tvaudio.c2
-rw-r--r--linux/drivers/media/video/tveeprom.c2
-rw-r--r--v4l/ChangeLog8
-rw-r--r--v4l/Make.config2
-rw-r--r--v4l/Makefile6
14 files changed, 20 insertions, 68 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-core.c b/linux/drivers/media/video/cx88/cx88-core.c
index 342233e09..b82abf2b3 100644
--- a/linux/drivers/media/video/cx88/cx88-core.c
+++ b/linux/drivers/media/video/cx88/cx88-core.c
@@ -1,5 +1,5 @@
/*
- * $Id: cx88-core.c,v 1.29 2005/06/13 08:42:51 nsh Exp $
+ * $Id: cx88-core.c,v 1.30 2005/06/17 20:49:30 nsh Exp $
*
* device driver for Conexant 2388x based TV cards
* driver core
@@ -1013,21 +1013,7 @@ int cx88_set_tvnorm(struct cx88_core *core, struct cx88_tvnorm *norm)
set_tvaudio(core);
// tell i2c chips
-#ifdef V4L2_I2C_CLIENTS
cx88_call_i2c_clients(core,VIDIOC_S_STD,&norm->id);
-#else
- {
- struct video_channel c;
- memset(&c,0,sizeof(c));
- c.channel = core->input;
- c.norm = VIDEO_MODE_PAL;
- if ((norm->id & (V4L2_STD_NTSC_M|V4L2_STD_NTSC_M_JP)))
- c.norm = VIDEO_MODE_NTSC;
- if (norm->id & V4L2_STD_SECAM)
- c.norm = VIDEO_MODE_SECAM;
- cx88_call_i2c_clients(core,VIDIOCSCHAN,&c);
- }
-#endif
// done
return 0;
diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c
index 3ceb8cb96..7edb24afa 100644
--- a/linux/drivers/media/video/cx88/cx88-video.c
+++ b/linux/drivers/media/video/cx88/cx88-video.c
@@ -1,5 +1,5 @@
/*
- * $Id: cx88-video.c,v 1.66 2005/06/17 03:36:10 mchehab Exp $
+ * $Id: cx88-video.c,v 1.67 2005/06/17 20:49:30 nsh Exp $
*
* device driver for Conexant 2388x based TV cards
* video4linux video interface
@@ -1616,11 +1616,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
down(&dev->lock);
dev->freq = f->frequency;
cx88_newstation(core);
-#ifdef V4L2_I2C_CLIENTS
cx88_call_i2c_clients(dev->core,VIDIOC_S_FREQUENCY,f);
-#else
- cx88_call_i2c_clients(dev->core,VIDIOCSFREQ,&dev->freq);
-#endif
up(&dev->lock);
return 0;
}
@@ -1731,16 +1727,7 @@ static int radio_do_ioctl(struct inode *inode, struct file *file,
memset(t,0,sizeof(*t));
strcpy(t->name, "Radio");
-#ifdef V4L2_I2C_CLIENTS
cx88_call_i2c_clients(dev->core,VIDIOC_G_TUNER,t);
-#else
- {
- struct video_tuner vt;
- memset(&vt,0,sizeof(vt));
- cx88_call_i2c_clients(dev,VIDIOCGTUNER,&vt);
- t->signal = vt.signal;
- }
-#endif
return 0;
}
case VIDIOC_ENUMINPUT:
diff --git a/linux/drivers/media/video/cx88/cx88.h b/linux/drivers/media/video/cx88/cx88.h
index e885fc772..7fb2f89e9 100644
--- a/linux/drivers/media/video/cx88/cx88.h
+++ b/linux/drivers/media/video/cx88/cx88.h
@@ -1,5 +1,5 @@
/*
- * $Id: cx88.h,v 1.63 2005/06/12 23:32:13 nsh Exp $
+ * $Id: cx88.h,v 1.64 2005/06/17 20:49:30 nsh Exp $
*
* v4l2 device driver for cx2388x based TV cards
*
@@ -52,8 +52,6 @@
/* ----------------------------------------------------------- */
/* defines and enums */
-#define V4L2_I2C_CLIENTS 1
-
#define FORMAT_FLAGS_PACKED 0x01
#define FORMAT_FLAGS_PLANAR 0x02
diff --git a/linux/drivers/media/video/msp3400-driver.c b/linux/drivers/media/video/msp3400-driver.c
index 174ee99d8..a1ffae3c2 100644
--- a/linux/drivers/media/video/msp3400-driver.c
+++ b/linux/drivers/media/video/msp3400-driver.c
@@ -148,7 +148,7 @@ static unsigned short normal_i2c[] = {
I2C_MSP3400C_ALT >> 1,
I2C_CLIENT_END
};
-#ifdef CONFIG_USE_I2C_RANGE
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,12)
static unsigned short normal_i2c_range[] = { I2C_CLIENT_END };
#endif
I2C_CLIENT_INSMOD;
diff --git a/linux/drivers/media/video/msp3400.c b/linux/drivers/media/video/msp3400.c
index 174ee99d8..a1ffae3c2 100644
--- a/linux/drivers/media/video/msp3400.c
+++ b/linux/drivers/media/video/msp3400.c
@@ -148,7 +148,7 @@ static unsigned short normal_i2c[] = {
I2C_MSP3400C_ALT >> 1,
I2C_CLIENT_END
};
-#ifdef CONFIG_USE_I2C_RANGE
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,12)
static unsigned short normal_i2c_range[] = { I2C_CLIENT_END };
#endif
I2C_CLIENT_INSMOD;
diff --git a/linux/drivers/media/video/saa6752hs.c b/linux/drivers/media/video/saa6752hs.c
index bb786bd43..3671d9ee7 100644
--- a/linux/drivers/media/video/saa6752hs.c
+++ b/linux/drivers/media/video/saa6752hs.c
@@ -28,7 +28,7 @@
/* Addresses to scan */
static unsigned short normal_i2c[] = {0x20, I2C_CLIENT_END};
-#ifdef CONFIG_USE_I2C_RANGE
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,12)
static unsigned short normal_i2c_range[] = { I2C_CLIENT_END };
#endif
I2C_CLIENT_INSMOD;
diff --git a/linux/drivers/media/video/saa7134/saa6752hs.c b/linux/drivers/media/video/saa7134/saa6752hs.c
index bb786bd43..3671d9ee7 100644
--- a/linux/drivers/media/video/saa7134/saa6752hs.c
+++ b/linux/drivers/media/video/saa7134/saa6752hs.c
@@ -28,7 +28,7 @@
/* Addresses to scan */
static unsigned short normal_i2c[] = {0x20, I2C_CLIENT_END};
-#ifdef CONFIG_USE_I2C_RANGE
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,12)
static unsigned short normal_i2c_range[] = { I2C_CLIENT_END };
#endif
I2C_CLIENT_INSMOD;
diff --git a/linux/drivers/media/video/tda9887.c b/linux/drivers/media/video/tda9887.c
index 827b65e90..2f6ef2058 100644
--- a/linux/drivers/media/video/tda9887.c
+++ b/linux/drivers/media/video/tda9887.c
@@ -41,7 +41,7 @@ static unsigned short normal_i2c[] = {
0x96 >>1,
I2C_CLIENT_END,
};
-#ifdef CONFIG_USE_I2C_RANGE
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,12)
static unsigned short normal_i2c_range[] = { I2C_CLIENT_END };
#endif
I2C_CLIENT_INSMOD;
diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c
index c81f87968..c8e06e182 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.18 2005/06/16 08:29:49 nsh Exp $
+ * $Id: tuner-core.c,v 1.19 2005/06/17 20:49:30 nsh Exp $
*
* i2c tv tuner chip device driver
* core core, i.e. kernel interfaces, registering and so on
@@ -37,7 +37,7 @@ static unsigned short normal_i2c[] = {
0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
I2C_CLIENT_END
};
-#ifdef CONFIG_USE_I2C_RANGE
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,12)
static unsigned short normal_i2c_range[] = { I2C_CLIENT_END };
#endif
I2C_CLIENT_INSMOD;
@@ -67,9 +67,7 @@ MODULE_AUTHOR("Ralph Metzler, Gerd Knorr, Gunther Mayer");
MODULE_LICENSE("GPL");
static int this_adap;
-#ifdef CONFIG_TUNER_MULTI_I2C
static unsigned short first_tuner, tv_tuner, radio_tuner;
-#endif
static struct i2c_driver driver;
static struct i2c_client client_template;
@@ -180,19 +178,12 @@ static void set_type(struct i2c_client *c, unsigned int type)
}
}
-#ifdef CONFIG_TUNER_MULTI_I2C
#define CHECK_ADDR(tp,cmd,tun) if (client->addr!=tp) { \
return 0; } else \
tuner_info ("Cmd %s accepted to "tun"\n",cmd);
#define CHECK_MODE(cmd) if (t->mode == V4L2_TUNER_RADIO) { \
CHECK_ADDR(radio_tuner,cmd,"radio") } else \
{ CHECK_ADDR(tv_tuner,cmd,"TV"); }
-#else
-#define CHECK_ADDR(tp,cmd,tun) tuner_info ("Cmd %s accepted to "tun"\n",cmd);
-#define CHECK_MODE(cmd) tuner_info ("Cmd %s accepted\n",cmd);
-#endif
-
-#ifdef CONFIG_TUNER_MULTI_I2C
static void set_addr(struct i2c_client *c, struct tuner_addr *tun_addr)
{
@@ -223,9 +214,6 @@ static void set_addr(struct i2c_client *c, struct tuner_addr *tun_addr)
}
set_type(c,tun_addr->type);
}
-#else
-#define set_addr(c,tun_addr) set_type(c,(tun_addr)->type)
-#endif
static char pal[] = "-";
module_param_string(pal, pal, sizeof(pal), 0644);
@@ -265,17 +253,12 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind)
{
struct tuner *t;
-#ifndef CONFIG_TUNER_MULTI_I2C
- if (this_adap > 0)
- return -1;
-#else
/* by default, first I2C card is both tv and radio tuner */
if (this_adap == 0) {
first_tuner = addr;
tv_tuner = addr;
radio_tuner = addr;
}
-#endif
this_adap++;
client_template.adapter = adap;
@@ -306,11 +289,9 @@ static int tuner_probe(struct i2c_adapter *adap)
}
this_adap = 0;
-#ifdef CONFIG_TUNER_MULTI_I2C
first_tuner = 0;
tv_tuner = 0;
radio_tuner = 0;
-#endif
if (adap->class & I2C_CLASS_TV_ANALOG)
return i2c_probe(adap, &addr_data, tuner_attach);
diff --git a/linux/drivers/media/video/tvaudio.c b/linux/drivers/media/video/tvaudio.c
index 637feb9eb..8b5d24161 100644
--- a/linux/drivers/media/video/tvaudio.c
+++ b/linux/drivers/media/video/tvaudio.c
@@ -154,7 +154,7 @@ static unsigned short normal_i2c[] = {
I2C_TDA9874 >> 1,
I2C_PIC16C54 >> 1,
I2C_CLIENT_END };
-#ifdef CONFIG_USE_I2C_RANGE
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,12)
static unsigned short normal_i2c_range[] = { I2C_CLIENT_END };
#endif
I2C_CLIENT_INSMOD;
diff --git a/linux/drivers/media/video/tveeprom.c b/linux/drivers/media/video/tveeprom.c
index a82d43965..a7112ede0 100644
--- a/linux/drivers/media/video/tveeprom.c
+++ b/linux/drivers/media/video/tveeprom.c
@@ -483,7 +483,7 @@ static unsigned short normal_i2c[] = {
0xa0 >> 1,
I2C_CLIENT_END,
};
-#ifdef CONFIG_USE_I2C_RANGE
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,12)
static unsigned short normal_i2c_range[] = { I2C_CLIENT_END };
#endif
diff --git a/v4l/ChangeLog b/v4l/ChangeLog
index 330c27224..1dbe3323e 100644
--- a/v4l/ChangeLog
+++ b/v4l/ChangeLog
@@ -1,3 +1,11 @@
+2005-06-18 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
+ * Make.config, Makefile, cx88-core.c, cx88-video.c:
+ * cx88.h, msp3400.c, saa6752hs.c:
+ * tda9887.c, tuner-core.c, tvaudio.c, tveeprom.c:
+
+ - Remove unneeded config options. Now I2C_CLIENT_MULTI
+ and I2C_NORMAL_RANGE is checked on the fly.
+
2005-06-17 23:54 nshmyrev
* videodev2.h:
diff --git a/v4l/Make.config b/v4l/Make.config
index 14542fe0a..221f4bcb4 100644
--- a/v4l/Make.config
+++ b/v4l/Make.config
@@ -7,8 +7,6 @@ CONFIG_VIDEO_IR := m
CONFIG_VIDEO_TUNER := m
CONFIG_VIDEO_TVAUDIO := m
CONFIG_VIDEO_CX88 := m
-CONFIG_TUNER_MULTI_I2C := y
-CONFIG_USE_I2C_RANGE := y
# doesn't build on kernels older than 2.6.10
CONFIG_VIDEO_CX88_DVB := n
diff --git a/v4l/Makefile b/v4l/Makefile
index 2b9ae9c62..39d93b57b 100644
--- a/v4l/Makefile
+++ b/v4l/Makefile
@@ -59,12 +59,6 @@ EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/frontends/
ifeq ($(CONFIG_VIDEO_CX88_DVB),m)
EXTRA_CFLAGS += -DCONFIG_VIDEO_CX88_DVB_MODULE=1
endif
-ifeq ($(CONFIG_TUNER_MULTI_I2C),y)
- EXTRA_CFLAGS += -DCONFIG_TUNER_MULTI_I2C=1
-endif
-ifeq ($(CONFIG_USE_I2C_RANGE),y)
- EXTRA_CFLAGS += -DCONFIG_USE_I2C_RANGE=1
-endif
#################################################
# compile modules