aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ivtv
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-04-01 02:57:53 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-04-06 20:44:24 -0400
commite6574f2fbecdb8af807169d345c10131ae060a88 (patch)
tree9923d1065397b9796a476cac238bacbdf1d820d1 /drivers/media/video/ivtv
parent868f985c2fb85b5f32785bb55a349d180a30f3d3 (diff)
V4L/DVB (11373): v4l2-common: add explicit v4l2_device pointer as first arg to new_(probed)_subdev
The functions v4l2_i2c_new_subdev and v4l2_i2c_new_probed_subdev relied on i2c_get_adapdata to return the v4l2_device. However, this is not always possible on embedded platforms. So modify the API to pass the v4l2_device pointer explicitly. 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-i2c.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/media/video/ivtv/ivtv-i2c.c b/drivers/media/video/ivtv/ivtv-i2c.c
index e73a196ecc7a..1a289fd33cd4 100644
--- a/drivers/media/video/ivtv/ivtv-i2c.c
+++ b/drivers/media/video/ivtv/ivtv-i2c.c
@@ -161,15 +161,18 @@ int ivtv_i2c_register(struct ivtv *itv, unsigned idx)
161 return -1; 161 return -1;
162 if (hw == IVTV_HW_TUNER) { 162 if (hw == IVTV_HW_TUNER) {
163 /* special tuner handling */ 163 /* special tuner handling */
164 sd = v4l2_i2c_new_probed_subdev(adap, mod, type, 164 sd = v4l2_i2c_new_probed_subdev(&itv->v4l2_dev,
165 adap, mod, type,
165 itv->card_i2c->radio); 166 itv->card_i2c->radio);
166 if (sd) 167 if (sd)
167 sd->grp_id = 1 << idx; 168 sd->grp_id = 1 << idx;
168 sd = v4l2_i2c_new_probed_subdev(adap, mod, type, 169 sd = v4l2_i2c_new_probed_subdev(&itv->v4l2_dev,
170 adap, mod, type,
169 itv->card_i2c->demod); 171 itv->card_i2c->demod);
170 if (sd) 172 if (sd)
171 sd->grp_id = 1 << idx; 173 sd->grp_id = 1 << idx;
172 sd = v4l2_i2c_new_probed_subdev(adap, mod, type, 174 sd = v4l2_i2c_new_probed_subdev(&itv->v4l2_dev,
175 adap, mod, type,
173 itv->card_i2c->tv); 176 itv->card_i2c->tv);
174 if (sd) 177 if (sd)
175 sd->grp_id = 1 << idx; 178 sd->grp_id = 1 << idx;
@@ -180,9 +183,11 @@ int ivtv_i2c_register(struct ivtv *itv, unsigned idx)
180 if (hw == IVTV_HW_UPD64031A || hw == IVTV_HW_UPD6408X) { 183 if (hw == IVTV_HW_UPD64031A || hw == IVTV_HW_UPD6408X) {
181 unsigned short addrs[2] = { hw_addrs[idx], I2C_CLIENT_END }; 184 unsigned short addrs[2] = { hw_addrs[idx], I2C_CLIENT_END };
182 185
183 sd = v4l2_i2c_new_probed_subdev(adap, mod, type, addrs); 186 sd = v4l2_i2c_new_probed_subdev(&itv->v4l2_dev,
187 adap, mod, type, addrs);
184 } else { 188 } else {
185 sd = v4l2_i2c_new_subdev(adap, mod, type, hw_addrs[idx]); 189 sd = v4l2_i2c_new_subdev(&itv->v4l2_dev,
190 adap, mod, type, hw_addrs[idx]);
186 } 191 }
187 if (sd) 192 if (sd)
188 sd->grp_id = 1 << idx; 193 sd->grp_id = 1 << idx;