diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-01-15 09:37:14 +0100 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2009-01-15 09:37:14 +0100 |
commit | 675dd105ced8a06d7eac4abb6b6d01137447971d (patch) | |
tree | 190c28aeb72e3027ae36272f732573e6d0412d48 /linux/drivers/media/video/cx25840/cx25840-core.c | |
parent | 2263aaefe6901d5e1bdae1553d404c94b1318b17 (diff) | |
download | mediapointer-dvb-s2-675dd105ced8a06d7eac4abb6b6d01137447971d.tar.gz mediapointer-dvb-s2-675dd105ced8a06d7eac4abb6b6d01137447971d.tar.bz2 |
cx25840: fix regression: fw not loaded on first use
From: Hans Verkuil <hverkuil@xs4all.nl>
With the conversion to v4l2_subdev one bit of code was accidentally dropped:
on receiving the first command the driver has to load the fw. A new init()
command was introduced to do that explicitly for bridge drivers that are
converted to use v4l2_subdev, but old drivers that are not yet converted
no longer worked.
This patch fixes this regression for these old drivers.
Priority: high
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers/media/video/cx25840/cx25840-core.c')
-rw-r--r-- | linux/drivers/media/video/cx25840/cx25840-core.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/linux/drivers/media/video/cx25840/cx25840-core.c b/linux/drivers/media/video/cx25840/cx25840-core.c index 479700c8c..2860cd702 100644 --- a/linux/drivers/media/video/cx25840/cx25840-core.c +++ b/linux/drivers/media/video/cx25840/cx25840-core.c @@ -1401,6 +1401,14 @@ static int cx25840_log_status(struct v4l2_subdev *sd) static int cx25840_command(struct i2c_client *client, unsigned cmd, void *arg) { + /* ignore this command */ + if (cmd == TUNER_SET_TYPE_ADDR) + return 0; + + /* Old-style drivers rely on initialization on first use, so + call the init whenever a command is issued to this driver. + New-style drivers using v4l2_subdev should call init explicitly. */ + cx25840_init(i2c_get_clientdata(client), 0); return v4l2_subdev_command(i2c_get_clientdata(client), cmd, arg); } |