summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/tuner-core.c
diff options
context:
space:
mode:
authorNickolay V. Shmyrev <devnull@localhost>2005-06-17 20:49:30 +0000
committerNickolay V. Shmyrev <devnull@localhost>2005-06-17 20:49:30 +0000
commita085c62e8b7277e8802f295059ad35a8fcb73e2e (patch)
treec1432e4d7a642e299de8690171121fa7a55fcfdc /linux/drivers/media/video/tuner-core.c
parent1a8395bd7f1fd3496f8812dd01d75feb3fe2cd0b (diff)
downloadmediapointer-dvb-s2-a085c62e8b7277e8802f295059ad35a8fcb73e2e.tar.gz
mediapointer-dvb-s2-a085c62e8b7277e8802f295059ad35a8fcb73e2e.tar.bz2
* 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.
Diffstat (limited to 'linux/drivers/media/video/tuner-core.c')
-rw-r--r--linux/drivers/media/video/tuner-core.c23
1 files changed, 2 insertions, 21 deletions
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);