diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-07-26 10:49:35 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-07-26 10:49:35 -0300 |
commit | 9a1c8c1ee97550f01ef0be6fe7ea966c182f2c01 (patch) | |
tree | 00d80a5590ad47e8a82b5b91b5e4ccfede62d561 /linux/drivers/media/video/cx25840/cx25840-core.c | |
parent | f43b76ddd92861fbc33bc5d3b28efaffa3b373ef (diff) | |
parent | 65b0964cd78a726b372af8d19658e4dfd3137a24 (diff) | |
download | mediapointer-dvb-s2-9a1c8c1ee97550f01ef0be6fe7ea966c182f2c01.tar.gz mediapointer-dvb-s2-9a1c8c1ee97550f01ef0be6fe7ea966c182f2c01.tar.bz2 |
merge: http://linuxtv.org/hg/~hverkuil/v4l-dvb
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/cx25840/cx25840-core.c')
-rw-r--r-- | linux/drivers/media/video/cx25840/cx25840-core.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/linux/drivers/media/video/cx25840/cx25840-core.c b/linux/drivers/media/video/cx25840/cx25840-core.c index 9d40a2b95..77aca112c 100644 --- a/linux/drivers/media/video/cx25840/cx25840-core.c +++ b/linux/drivers/media/video/cx25840/cx25840-core.c @@ -636,6 +636,22 @@ static int cx25840_command(struct i2c_client *client, unsigned int cmd, struct v4l2_tuner *vt = arg; struct v4l2_routing *route = arg; + /* ignore these commands */ + switch (cmd) { + case TUNER_SET_TYPE_ADDR: + return 0; + } + + if (!state->is_initialized) { + v4l_dbg(1, cx25840_debug, client, "cmd %08x triggered fw load\n", cmd); + /* initialize on first use */ + state->is_initialized = 1; + if (state->is_cx25836) + cx25836_initialize(client); + else + cx25840_initialize(client, 1); + } + switch (cmd) { #ifdef CONFIG_VIDEO_ADV_DEBUG /* ioctls to allow direct access to the @@ -927,11 +943,6 @@ static int cx25840_detect_client(struct i2c_adapter *adapter, int address, i2c_attach_client(client); - if (state->is_cx25836) - cx25836_initialize(client); - else - cx25840_initialize(client, 1); - #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) MOD_INC_USE_COUNT; #endif |