diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-08-23 06:24:07 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-12 07:36:54 -0400 |
commit | 601e9444f249d219009ec05674268d90f6f1cdcb (patch) | |
tree | 42d58813872e340e03a40b74922ea89dfdcf0c55 /drivers/media/radio/radio-maxiradio.c | |
parent | e138c592b50370621653fd962b2bc3f4e25dfe78 (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-maxiradio.c')
-rw-r--r-- | drivers/media/radio/radio-maxiradio.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/radio/radio-maxiradio.c b/drivers/media/radio/radio-maxiradio.c index 4e2e8a3d9b5f..9bf2acf5249c 100644 --- a/drivers/media/radio/radio-maxiradio.c +++ b/drivers/media/radio/radio-maxiradio.c | |||
@@ -232,7 +232,7 @@ static int vidioc_g_tuner (struct file *file, void *priv, | |||
232 | struct v4l2_tuner *v) | 232 | struct v4l2_tuner *v) |
233 | { | 233 | { |
234 | struct video_device *dev = video_devdata(file); | 234 | struct video_device *dev = video_devdata(file); |
235 | struct radio_device *card=dev->priv; | 235 | struct radio_device *card = video_get_drvdata(dev); |
236 | 236 | ||
237 | if (v->index > 0) | 237 | if (v->index > 0) |
238 | return -EINVAL; | 238 | return -EINVAL; |
@@ -303,7 +303,7 @@ static int vidioc_s_frequency (struct file *file, void *priv, | |||
303 | struct v4l2_frequency *f) | 303 | struct v4l2_frequency *f) |
304 | { | 304 | { |
305 | struct video_device *dev = video_devdata(file); | 305 | struct video_device *dev = video_devdata(file); |
306 | struct radio_device *card=dev->priv; | 306 | struct radio_device *card = video_get_drvdata(dev); |
307 | 307 | ||
308 | if (f->frequency < FREQ_LO || f->frequency > FREQ_HI) { | 308 | if (f->frequency < FREQ_LO || f->frequency > FREQ_HI) { |
309 | dprintk(1, "radio freq (%d.%02d MHz) out of range (%d-%d)\n", | 309 | dprintk(1, "radio freq (%d.%02d MHz) out of range (%d-%d)\n", |
@@ -325,7 +325,7 @@ static int vidioc_g_frequency (struct file *file, void *priv, | |||
325 | struct v4l2_frequency *f) | 325 | struct v4l2_frequency *f) |
326 | { | 326 | { |
327 | struct video_device *dev = video_devdata(file); | 327 | struct video_device *dev = video_devdata(file); |
328 | struct radio_device *card=dev->priv; | 328 | struct radio_device *card = video_get_drvdata(dev); |
329 | 329 | ||
330 | f->type = V4L2_TUNER_RADIO; | 330 | f->type = V4L2_TUNER_RADIO; |
331 | f->frequency = card->freq; | 331 | f->frequency = card->freq; |
@@ -356,7 +356,7 @@ static int vidioc_g_ctrl (struct file *file, void *priv, | |||
356 | struct v4l2_control *ctrl) | 356 | struct v4l2_control *ctrl) |
357 | { | 357 | { |
358 | struct video_device *dev = video_devdata(file); | 358 | struct video_device *dev = video_devdata(file); |
359 | struct radio_device *card=dev->priv; | 359 | struct radio_device *card = video_get_drvdata(dev); |
360 | 360 | ||
361 | switch (ctrl->id) { | 361 | switch (ctrl->id) { |
362 | case V4L2_CID_AUDIO_MUTE: | 362 | case V4L2_CID_AUDIO_MUTE: |
@@ -371,7 +371,7 @@ static int vidioc_s_ctrl (struct file *file, void *priv, | |||
371 | struct v4l2_control *ctrl) | 371 | struct v4l2_control *ctrl) |
372 | { | 372 | { |
373 | struct video_device *dev = video_devdata(file); | 373 | struct video_device *dev = video_devdata(file); |
374 | struct radio_device *card=dev->priv; | 374 | struct radio_device *card = video_get_drvdata(dev); |
375 | 375 | ||
376 | switch (ctrl->id) { | 376 | switch (ctrl->id) { |
377 | case V4L2_CID_AUDIO_MUTE: | 377 | case V4L2_CID_AUDIO_MUTE: |
@@ -421,7 +421,7 @@ static int __devinit maxiradio_init_one(struct pci_dev *pdev, const struct pci_d | |||
421 | 421 | ||
422 | radio_unit.io = pci_resource_start(pdev, 0); | 422 | radio_unit.io = pci_resource_start(pdev, 0); |
423 | mutex_init(&radio_unit.lock); | 423 | mutex_init(&radio_unit.lock); |
424 | maxiradio_radio.priv = &radio_unit; | 424 | video_set_drvdata(&maxiradio_radio, &radio_unit); |
425 | 425 | ||
426 | if (video_register_device(&maxiradio_radio, VFL_TYPE_RADIO, radio_nr) < 0) { | 426 | if (video_register_device(&maxiradio_radio, VFL_TYPE_RADIO, radio_nr) < 0) { |
427 | printk("radio-maxiradio: can't register device!"); | 427 | printk("radio-maxiradio: can't register device!"); |