aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ivtv/ivtv-i2c.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-08-10 01:49:08 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-09-18 23:19:24 -0400
commit53dacb15705901e14b03dcba27e40364fedd9d09 (patch)
treeca3b4111465aca9d58024ace0f0072ee7952c11e /drivers/media/video/ivtv/ivtv-i2c.c
parent0da2808ca27ab7f65346d4d191569c669db8f628 (diff)
V4L/DVB (12540): v4l: simplify v4l2_i2c_new_subdev and friends
Rewrite v4l2_i2c_new_subdev as a simplified version of v4l2_i2c_new_subdev_cfg and remove v4l2_i2c_new_probed_subdev and v4l2_i2c_new_probed_subdev_addr. This simplifies this API substantially. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-i2c.c')
-rw-r--r--drivers/media/video/ivtv/ivtv-i2c.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/media/video/ivtv/ivtv-i2c.c b/drivers/media/video/ivtv/ivtv-i2c.c
index 8f15a31d3f66..b9c71e61f7d6 100644
--- a/drivers/media/video/ivtv/ivtv-i2c.c
+++ b/drivers/media/video/ivtv/ivtv-i2c.c
@@ -161,19 +161,19 @@ 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(&itv->v4l2_dev, 164 sd = v4l2_i2c_new_subdev(&itv->v4l2_dev,
165 adap, mod, type, 165 adap, mod, type,
166 itv->card_i2c->radio); 166 0, itv->card_i2c->radio);
167 if (sd) 167 if (sd)
168 sd->grp_id = 1 << idx; 168 sd->grp_id = 1 << idx;
169 sd = v4l2_i2c_new_probed_subdev(&itv->v4l2_dev, 169 sd = v4l2_i2c_new_subdev(&itv->v4l2_dev,
170 adap, mod, type, 170 adap, mod, type,
171 itv->card_i2c->demod); 171 0, itv->card_i2c->demod);
172 if (sd) 172 if (sd)
173 sd->grp_id = 1 << idx; 173 sd->grp_id = 1 << idx;
174 sd = v4l2_i2c_new_probed_subdev(&itv->v4l2_dev, 174 sd = v4l2_i2c_new_subdev(&itv->v4l2_dev,
175 adap, mod, type, 175 adap, mod, type,
176 itv->card_i2c->tv); 176 0, itv->card_i2c->tv);
177 if (sd) 177 if (sd)
178 sd->grp_id = 1 << idx; 178 sd->grp_id = 1 << idx;
179 return sd ? 0 : -1; 179 return sd ? 0 : -1;
@@ -181,11 +181,11 @@ int ivtv_i2c_register(struct ivtv *itv, unsigned idx)
181 if (!hw_addrs[idx]) 181 if (!hw_addrs[idx])
182 return -1; 182 return -1;
183 if (hw == IVTV_HW_UPD64031A || hw == IVTV_HW_UPD6408X) { 183 if (hw == IVTV_HW_UPD64031A || hw == IVTV_HW_UPD6408X) {
184 sd = v4l2_i2c_new_probed_subdev_addr(&itv->v4l2_dev, 184 sd = v4l2_i2c_new_subdev(&itv->v4l2_dev,
185 adap, mod, type, hw_addrs[idx]); 185 adap, mod, type, 0, I2C_ADDRS(hw_addrs[idx]));
186 } else { 186 } else {
187 sd = v4l2_i2c_new_subdev(&itv->v4l2_dev, 187 sd = v4l2_i2c_new_subdev(&itv->v4l2_dev,
188 adap, mod, type, hw_addrs[idx]); 188 adap, mod, type, hw_addrs[idx], NULL);
189 } 189 }
190 if (sd) 190 if (sd)
191 sd->grp_id = 1 << idx; 191 sd->grp_id = 1 << idx;