aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/radio/radio-gemtek.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-gemtek.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-gemtek.c')
-rw-r--r--drivers/media/radio/radio-gemtek.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/media/radio/radio-gemtek.c b/drivers/media/radio/radio-gemtek.c
index 2d991ae2f205..2c4c15e6d510 100644
--- a/drivers/media/radio/radio-gemtek.c
+++ b/drivers/media/radio/radio-gemtek.c
@@ -460,7 +460,7 @@ static int vidioc_s_frequency(struct file *file, void *priv,
460 struct v4l2_frequency *f) 460 struct v4l2_frequency *f)
461{ 461{
462 struct video_device *dev = video_devdata(file); 462 struct video_device *dev = video_devdata(file);
463 struct gemtek_device *rt = dev->priv; 463 struct gemtek_device *rt = video_get_drvdata(dev);
464 464
465 gemtek_setfreq(rt, f->frequency); 465 gemtek_setfreq(rt, f->frequency);
466 466
@@ -471,7 +471,7 @@ static int vidioc_g_frequency(struct file *file, void *priv,
471 struct v4l2_frequency *f) 471 struct v4l2_frequency *f)
472{ 472{
473 struct video_device *dev = video_devdata(file); 473 struct video_device *dev = video_devdata(file);
474 struct gemtek_device *rt = dev->priv; 474 struct gemtek_device *rt = video_get_drvdata(dev);
475 475
476 f->type = V4L2_TUNER_RADIO; 476 f->type = V4L2_TUNER_RADIO;
477 f->frequency = rt->lastfreq; 477 f->frequency = rt->lastfreq;
@@ -496,7 +496,7 @@ static int vidioc_g_ctrl(struct file *file, void *priv,
496 struct v4l2_control *ctrl) 496 struct v4l2_control *ctrl)
497{ 497{
498 struct video_device *dev = video_devdata(file); 498 struct video_device *dev = video_devdata(file);
499 struct gemtek_device *rt = dev->priv; 499 struct gemtek_device *rt = video_get_drvdata(dev);
500 500
501 switch (ctrl->id) { 501 switch (ctrl->id) {
502 case V4L2_CID_AUDIO_MUTE: 502 case V4L2_CID_AUDIO_MUTE:
@@ -516,7 +516,7 @@ static int vidioc_s_ctrl(struct file *file, void *priv,
516 struct v4l2_control *ctrl) 516 struct v4l2_control *ctrl)
517{ 517{
518 struct video_device *dev = video_devdata(file); 518 struct video_device *dev = video_devdata(file);
519 struct gemtek_device *rt = dev->priv; 519 struct gemtek_device *rt = video_get_drvdata(dev);
520 520
521 switch (ctrl->id) { 521 switch (ctrl->id) {
522 case V4L2_CID_AUDIO_MUTE: 522 case V4L2_CID_AUDIO_MUTE:
@@ -623,7 +623,7 @@ static int __init gemtek_init(void)
623 return -EINVAL; 623 return -EINVAL;
624 } 624 }
625 625
626 gemtek_radio.priv = &gemtek_unit; 626 video_set_drvdata(&gemtek_radio, &gemtek_unit);
627 627
628 if (video_register_device(&gemtek_radio, VFL_TYPE_RADIO, radio_nr) < 0) { 628 if (video_register_device(&gemtek_radio, VFL_TYPE_RADIO, radio_nr) < 0) {
629 release_region(io, 1); 629 release_region(io, 1);