aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/radio/radio-sf16fmr2.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-sf16fmr2.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-sf16fmr2.c')
-rw-r--r--drivers/media/radio/radio-sf16fmr2.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/radio/radio-sf16fmr2.c b/drivers/media/radio/radio-sf16fmr2.c
index 9625d1f0194e..9f823150452d 100644
--- a/drivers/media/radio/radio-sf16fmr2.c
+++ b/drivers/media/radio/radio-sf16fmr2.c
@@ -231,7 +231,7 @@ static int vidioc_g_tuner(struct file *file, void *priv,
231{ 231{
232 int mult; 232 int mult;
233 struct video_device *dev = video_devdata(file); 233 struct video_device *dev = video_devdata(file);
234 struct fmr2_device *fmr2 = dev->priv; 234 struct fmr2_device *fmr2 = video_get_drvdata(dev);
235 235
236 if (v->index > 0) 236 if (v->index > 0)
237 return -EINVAL; 237 return -EINVAL;
@@ -264,7 +264,7 @@ static int vidioc_s_frequency(struct file *file, void *priv,
264 struct v4l2_frequency *f) 264 struct v4l2_frequency *f)
265{ 265{
266 struct video_device *dev = video_devdata(file); 266 struct video_device *dev = video_devdata(file);
267 struct fmr2_device *fmr2 = dev->priv; 267 struct fmr2_device *fmr2 = video_get_drvdata(dev);
268 268
269 if (!(fmr2->flags & V4L2_TUNER_CAP_LOW)) 269 if (!(fmr2->flags & V4L2_TUNER_CAP_LOW))
270 f->frequency *= 1000; 270 f->frequency *= 1000;
@@ -288,7 +288,7 @@ static int vidioc_g_frequency(struct file *file, void *priv,
288 struct v4l2_frequency *f) 288 struct v4l2_frequency *f)
289{ 289{
290 struct video_device *dev = video_devdata(file); 290 struct video_device *dev = video_devdata(file);
291 struct fmr2_device *fmr2 = dev->priv; 291 struct fmr2_device *fmr2 = video_get_drvdata(dev);
292 292
293 f->type = V4L2_TUNER_RADIO; 293 f->type = V4L2_TUNER_RADIO;
294 f->frequency = fmr2->curfreq; 294 f->frequency = fmr2->curfreq;
@@ -315,7 +315,7 @@ static int vidioc_g_ctrl(struct file *file, void *priv,
315 struct v4l2_control *ctrl) 315 struct v4l2_control *ctrl)
316{ 316{
317 struct video_device *dev = video_devdata(file); 317 struct video_device *dev = video_devdata(file);
318 struct fmr2_device *fmr2 = dev->priv; 318 struct fmr2_device *fmr2 = video_get_drvdata(dev);
319 319
320 switch (ctrl->id) { 320 switch (ctrl->id) {
321 case V4L2_CID_AUDIO_MUTE: 321 case V4L2_CID_AUDIO_MUTE:
@@ -332,7 +332,7 @@ static int vidioc_s_ctrl(struct file *file, void *priv,
332 struct v4l2_control *ctrl) 332 struct v4l2_control *ctrl)
333{ 333{
334 struct video_device *dev = video_devdata(file); 334 struct video_device *dev = video_devdata(file);
335 struct fmr2_device *fmr2 = dev->priv; 335 struct fmr2_device *fmr2 = video_get_drvdata(dev);
336 336
337 switch (ctrl->id) { 337 switch (ctrl->id) {
338 case V4L2_CID_AUDIO_MUTE: 338 case V4L2_CID_AUDIO_MUTE:
@@ -454,7 +454,7 @@ static int __init fmr2_init(void)
454 fmr2_unit.stereo = 1; 454 fmr2_unit.stereo = 1;
455 fmr2_unit.flags = V4L2_TUNER_CAP_LOW; 455 fmr2_unit.flags = V4L2_TUNER_CAP_LOW;
456 fmr2_unit.card_type = 0; 456 fmr2_unit.card_type = 0;
457 fmr2_radio.priv = &fmr2_unit; 457 video_set_drvdata(&fmr2_radio, &fmr2_unit);
458 458
459 mutex_init(&lock); 459 mutex_init(&lock);
460 460