diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-04-01 02:57:53 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-04-06 20:44:24 -0400 |
commit | e6574f2fbecdb8af807169d345c10131ae060a88 (patch) | |
tree | 9923d1065397b9796a476cac238bacbdf1d820d1 /drivers/media/video/cx18/cx18-i2c.c | |
parent | 868f985c2fb85b5f32785bb55a349d180a30f3d3 (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/cx18/cx18-i2c.c')
-rw-r--r-- | drivers/media/video/cx18/cx18-i2c.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/media/video/cx18/cx18-i2c.c b/drivers/media/video/cx18/cx18-i2c.c index d092643faf46..b9b7064a2be8 100644 --- a/drivers/media/video/cx18/cx18-i2c.c +++ b/drivers/media/video/cx18/cx18-i2c.c | |||
@@ -100,16 +100,16 @@ int cx18_i2c_register(struct cx18 *cx, unsigned idx) | |||
100 | 100 | ||
101 | if (hw == CX18_HW_TUNER) { | 101 | if (hw == CX18_HW_TUNER) { |
102 | /* special tuner group handling */ | 102 | /* special tuner group handling */ |
103 | sd = v4l2_i2c_new_probed_subdev(adap, mod, type, | 103 | sd = v4l2_i2c_new_probed_subdev(&cx->v4l2_dev, |
104 | cx->card_i2c->radio); | 104 | adap, mod, type, cx->card_i2c->radio); |
105 | if (sd != NULL) | 105 | if (sd != NULL) |
106 | sd->grp_id = hw; | 106 | sd->grp_id = hw; |
107 | sd = v4l2_i2c_new_probed_subdev(adap, mod, type, | 107 | sd = v4l2_i2c_new_probed_subdev(&cx->v4l2_dev, |
108 | cx->card_i2c->demod); | 108 | adap, mod, type, cx->card_i2c->demod); |
109 | if (sd != NULL) | 109 | if (sd != NULL) |
110 | sd->grp_id = hw; | 110 | sd->grp_id = hw; |
111 | sd = v4l2_i2c_new_probed_subdev(adap, mod, type, | 111 | sd = v4l2_i2c_new_probed_subdev(&cx->v4l2_dev, |
112 | cx->card_i2c->tv); | 112 | adap, mod, type, cx->card_i2c->tv); |
113 | if (sd != NULL) | 113 | if (sd != NULL) |
114 | sd->grp_id = hw; | 114 | sd->grp_id = hw; |
115 | return sd != NULL ? 0 : -1; | 115 | return sd != NULL ? 0 : -1; |
@@ -120,7 +120,7 @@ int cx18_i2c_register(struct cx18 *cx, unsigned idx) | |||
120 | return -1; | 120 | return -1; |
121 | 121 | ||
122 | /* It's an I2C device other than an analog tuner */ | 122 | /* It's an I2C device other than an analog tuner */ |
123 | sd = v4l2_i2c_new_subdev(adap, mod, type, hw_addrs[idx]); | 123 | sd = v4l2_i2c_new_subdev(&cx->v4l2_dev, adap, mod, type, hw_addrs[idx]); |
124 | if (sd != NULL) | 124 | if (sd != NULL) |
125 | sd->grp_id = hw; | 125 | sd->grp_id = hw; |
126 | return sd != NULL ? 0 : -1; | 126 | return sd != NULL ? 0 : -1; |