aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-01-15 03:37:14 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-01-29 05:38:23 -0500
commitba390f005573bdf6ab7fd78bb05119036c2ed539 (patch)
tree971a5167757a6e534a4dd8b4bb2887283bf70db2
parentcf8e193a48879a02f55b53c0cf2ec98a784baaa5 (diff)
V4L/DVB (10250): cx25840: fix regression: fw not loaded on first use
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. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/cx25840/cx25840-core.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c
index 88f2fd32bfe3..b3b5b17dc8e7 100644
--- a/drivers/media/video/cx25840/cx25840-core.c
+++ b/drivers/media/video/cx25840/cx25840-core.c
@@ -1382,6 +1382,14 @@ static int cx25840_log_status(struct v4l2_subdev *sd)
1382 1382
1383static int cx25840_command(struct i2c_client *client, unsigned cmd, void *arg) 1383static int cx25840_command(struct i2c_client *client, unsigned cmd, void *arg)
1384{ 1384{
1385 /* ignore this command */
1386 if (cmd == TUNER_SET_TYPE_ADDR)
1387 return 0;
1388
1389 /* Old-style drivers rely on initialization on first use, so
1390 call the init whenever a command is issued to this driver.
1391 New-style drivers using v4l2_subdev should call init explicitly. */
1392 cx25840_init(i2c_get_clientdata(client), 0);
1385 return v4l2_subdev_command(i2c_get_clientdata(client), cmd, arg); 1393 return v4l2_subdev_command(i2c_get_clientdata(client), cmd, arg);
1386} 1394}
1387 1395