diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2010-08-06 09:53:19 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-08-08 22:43:05 -0400 |
commit | 72c851b00f6c86353c54fdd9f1ef88d82e8df6c5 (patch) | |
tree | dc6a86897e06b9ad5b576ef5d75a3c5ddab9815b /drivers/media/video/ivtv | |
parent | 59b8311a9b4cdd3e11d1c7d434bb9abf1ae3bc5c (diff) |
V4L/DVB: cx25840/ivtv: replace ugly priv control with s_config
The cx25840 used a private control CX25840_CID_ENABLE_PVR150_WORKAROUND
to be told whether to enable a workaround for certain pvr150 cards.
This is really config data that it needs to get at load time.
Implemented this in cx25840 and ivtv.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/ivtv')
-rw-r--r-- | drivers/media/video/ivtv/ivtv-driver.c | 9 | ||||
-rw-r--r-- | drivers/media/video/ivtv/ivtv-i2c.c | 7 |
2 files changed, 8 insertions, 8 deletions
diff --git a/drivers/media/video/ivtv/ivtv-driver.c b/drivers/media/video/ivtv/ivtv-driver.c index 07c5c18a25cb..f72e9d1cee09 100644 --- a/drivers/media/video/ivtv/ivtv-driver.c +++ b/drivers/media/video/ivtv/ivtv-driver.c | |||
@@ -1269,15 +1269,8 @@ int ivtv_init_on_first_open(struct ivtv *itv) | |||
1269 | IVTV_DEBUG_INFO("Getting firmware version..\n"); | 1269 | IVTV_DEBUG_INFO("Getting firmware version..\n"); |
1270 | ivtv_firmware_versions(itv); | 1270 | ivtv_firmware_versions(itv); |
1271 | 1271 | ||
1272 | if (itv->card->hw_all & IVTV_HW_CX25840) { | 1272 | if (itv->card->hw_all & IVTV_HW_CX25840) |
1273 | struct v4l2_control ctrl; | ||
1274 | |||
1275 | v4l2_subdev_call(itv->sd_video, core, load_fw); | 1273 | v4l2_subdev_call(itv->sd_video, core, load_fw); |
1276 | /* CX25840_CID_ENABLE_PVR150_WORKAROUND */ | ||
1277 | ctrl.id = V4L2_CID_PRIVATE_BASE; | ||
1278 | ctrl.value = itv->pvr150_workaround; | ||
1279 | v4l2_subdev_call(itv->sd_video, core, s_ctrl, &ctrl); | ||
1280 | } | ||
1281 | 1274 | ||
1282 | vf.tuner = 0; | 1275 | vf.tuner = 0; |
1283 | vf.type = V4L2_TUNER_ANALOG_TV; | 1276 | vf.type = V4L2_TUNER_ANALOG_TV; |
diff --git a/drivers/media/video/ivtv/ivtv-i2c.c b/drivers/media/video/ivtv/ivtv-i2c.c index a5b92d109c6c..d391bbdb0b8a 100644 --- a/drivers/media/video/ivtv/ivtv-i2c.c +++ b/drivers/media/video/ivtv/ivtv-i2c.c | |||
@@ -63,6 +63,7 @@ | |||
63 | #include "ivtv-cards.h" | 63 | #include "ivtv-cards.h" |
64 | #include "ivtv-gpio.h" | 64 | #include "ivtv-gpio.h" |
65 | #include "ivtv-i2c.h" | 65 | #include "ivtv-i2c.h" |
66 | #include <media/cx25840.h> | ||
66 | 67 | ||
67 | /* i2c implementation for cx23415/6 chip, ivtv project. | 68 | /* i2c implementation for cx23415/6 chip, ivtv project. |
68 | * Author: Kevin Thayer (nufan_wfk at yahoo.com) | 69 | * Author: Kevin Thayer (nufan_wfk at yahoo.com) |
@@ -292,6 +293,12 @@ int ivtv_i2c_register(struct ivtv *itv, unsigned idx) | |||
292 | if (hw == IVTV_HW_UPD64031A || hw == IVTV_HW_UPD6408X) { | 293 | if (hw == IVTV_HW_UPD64031A || hw == IVTV_HW_UPD6408X) { |
293 | sd = v4l2_i2c_new_subdev(&itv->v4l2_dev, | 294 | sd = v4l2_i2c_new_subdev(&itv->v4l2_dev, |
294 | adap, mod, type, 0, I2C_ADDRS(hw_addrs[idx])); | 295 | adap, mod, type, 0, I2C_ADDRS(hw_addrs[idx])); |
296 | } else if (hw == IVTV_HW_CX25840) { | ||
297 | struct cx25840_platform_data pdata; | ||
298 | |||
299 | pdata.pvr150_workaround = itv->pvr150_workaround; | ||
300 | sd = v4l2_i2c_new_subdev_cfg(&itv->v4l2_dev, | ||
301 | adap, mod, type, 0, &pdata, hw_addrs[idx], NULL); | ||
295 | } else { | 302 | } else { |
296 | sd = v4l2_i2c_new_subdev(&itv->v4l2_dev, | 303 | sd = v4l2_i2c_new_subdev(&itv->v4l2_dev, |
297 | adap, mod, type, hw_addrs[idx], NULL); | 304 | adap, mod, type, hw_addrs[idx], NULL); |