aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/radio/radio-typhoon.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-08-23 06:24:07 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-12 07:36:54 -0400
commit601e9444f249d219009ec05674268d90f6f1cdcb (patch)
tree42d58813872e340e03a40b74922ea89dfdcf0c55 /drivers/media/radio/radio-typhoon.c
parente138c592b50370621653fd962b2bc3f4e25dfe78 (diff)
V4L/DVB (8786): v4l2: remove the priv field, use dev_get_drvdata instead
Remove the priv field and let video_get/set_drvdata use dev_get_drvdata and dev_set_drvdata instead. Convert all drivers that still used priv directly. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/radio/radio-typhoon.c')
-rw-r--r--drivers/media/radio/radio-typhoon.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/media/radio/radio-typhoon.c b/drivers/media/radio/radio-typhoon.c
index c2eedb7a73a5..27255d7ff1ba 100644
--- a/drivers/media/radio/radio-typhoon.c
+++ b/drivers/media/radio/radio-typhoon.c
@@ -224,7 +224,7 @@ static int vidioc_s_frequency(struct file *file, void *priv,
224 struct v4l2_frequency *f) 224 struct v4l2_frequency *f)
225{ 225{
226 struct video_device *dev = video_devdata(file); 226 struct video_device *dev = video_devdata(file);
227 struct typhoon_device *typhoon = dev->priv; 227 struct typhoon_device *typhoon = video_get_drvdata(dev);
228 228
229 typhoon->curfreq = f->frequency; 229 typhoon->curfreq = f->frequency;
230 typhoon_setfreq(typhoon, typhoon->curfreq); 230 typhoon_setfreq(typhoon, typhoon->curfreq);
@@ -235,7 +235,7 @@ static int vidioc_g_frequency(struct file *file, void *priv,
235 struct v4l2_frequency *f) 235 struct v4l2_frequency *f)
236{ 236{
237 struct video_device *dev = video_devdata(file); 237 struct video_device *dev = video_devdata(file);
238 struct typhoon_device *typhoon = dev->priv; 238 struct typhoon_device *typhoon = video_get_drvdata(dev);
239 239
240 f->type = V4L2_TUNER_RADIO; 240 f->type = V4L2_TUNER_RADIO;
241 f->frequency = typhoon->curfreq; 241 f->frequency = typhoon->curfreq;
@@ -262,7 +262,7 @@ static int vidioc_g_ctrl(struct file *file, void *priv,
262 struct v4l2_control *ctrl) 262 struct v4l2_control *ctrl)
263{ 263{
264 struct video_device *dev = video_devdata(file); 264 struct video_device *dev = video_devdata(file);
265 struct typhoon_device *typhoon = dev->priv; 265 struct typhoon_device *typhoon = video_get_drvdata(dev);
266 266
267 switch (ctrl->id) { 267 switch (ctrl->id) {
268 case V4L2_CID_AUDIO_MUTE: 268 case V4L2_CID_AUDIO_MUTE:
@@ -279,7 +279,7 @@ static int vidioc_s_ctrl (struct file *file, void *priv,
279 struct v4l2_control *ctrl) 279 struct v4l2_control *ctrl)
280{ 280{
281 struct video_device *dev = video_devdata(file); 281 struct video_device *dev = video_devdata(file);
282 struct typhoon_device *typhoon = dev->priv; 282 struct typhoon_device *typhoon = video_get_drvdata(dev);
283 283
284 switch (ctrl->id) { 284 switch (ctrl->id) {
285 case V4L2_CID_AUDIO_MUTE: 285 case V4L2_CID_AUDIO_MUTE:
@@ -458,7 +458,7 @@ static int __init typhoon_init(void)
458 return -EBUSY; 458 return -EBUSY;
459 } 459 }
460 460
461 typhoon_radio.priv = &typhoon_unit; 461 video_set_drvdata(&typhoon_radio, &typhoon_unit);
462 if (video_register_device(&typhoon_radio, VFL_TYPE_RADIO, radio_nr) < 0) { 462 if (video_register_device(&typhoon_radio, VFL_TYPE_RADIO, radio_nr) < 0) {
463 release_region(io, 8); 463 release_region(io, 8);
464 return -EINVAL; 464 return -EINVAL;