aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/radio/radio-terratec.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-terratec.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-terratec.c')
-rw-r--r--drivers/media/radio/radio-terratec.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/radio/radio-terratec.c b/drivers/media/radio/radio-terratec.c
index de13ec81ce49..0bc9af686ad7 100644
--- a/drivers/media/radio/radio-terratec.c
+++ b/drivers/media/radio/radio-terratec.c
@@ -222,7 +222,7 @@ static int vidioc_g_tuner(struct file *file, void *priv,
222 struct v4l2_tuner *v) 222 struct v4l2_tuner *v)
223{ 223{
224 struct video_device *dev = video_devdata(file); 224 struct video_device *dev = video_devdata(file);
225 struct tt_device *tt = dev->priv; 225 struct tt_device *tt = video_get_drvdata(dev);
226 226
227 if (v->index > 0) 227 if (v->index > 0)
228 return -EINVAL; 228 return -EINVAL;
@@ -250,7 +250,7 @@ static int vidioc_s_frequency(struct file *file, void *priv,
250 struct v4l2_frequency *f) 250 struct v4l2_frequency *f)
251{ 251{
252 struct video_device *dev = video_devdata(file); 252 struct video_device *dev = video_devdata(file);
253 struct tt_device *tt = dev->priv; 253 struct tt_device *tt = video_get_drvdata(dev);
254 254
255 tt->curfreq = f->frequency; 255 tt->curfreq = f->frequency;
256 tt_setfreq(tt, tt->curfreq); 256 tt_setfreq(tt, tt->curfreq);
@@ -261,7 +261,7 @@ static int vidioc_g_frequency(struct file *file, void *priv,
261 struct v4l2_frequency *f) 261 struct v4l2_frequency *f)
262{ 262{
263 struct video_device *dev = video_devdata(file); 263 struct video_device *dev = video_devdata(file);
264 struct tt_device *tt = dev->priv; 264 struct tt_device *tt = video_get_drvdata(dev);
265 265
266 f->type = V4L2_TUNER_RADIO; 266 f->type = V4L2_TUNER_RADIO;
267 f->frequency = tt->curfreq; 267 f->frequency = tt->curfreq;
@@ -287,7 +287,7 @@ static int vidioc_g_ctrl(struct file *file, void *priv,
287 struct v4l2_control *ctrl) 287 struct v4l2_control *ctrl)
288{ 288{
289 struct video_device *dev = video_devdata(file); 289 struct video_device *dev = video_devdata(file);
290 struct tt_device *tt = dev->priv; 290 struct tt_device *tt = video_get_drvdata(dev);
291 291
292 switch (ctrl->id) { 292 switch (ctrl->id) {
293 case V4L2_CID_AUDIO_MUTE: 293 case V4L2_CID_AUDIO_MUTE:
@@ -307,7 +307,7 @@ static int vidioc_s_ctrl(struct file *file, void *priv,
307 struct v4l2_control *ctrl) 307 struct v4l2_control *ctrl)
308{ 308{
309 struct video_device *dev = video_devdata(file); 309 struct video_device *dev = video_devdata(file);
310 struct tt_device *tt = dev->priv; 310 struct tt_device *tt = video_get_drvdata(dev);
311 311
312 switch (ctrl->id) { 312 switch (ctrl->id) {
313 case V4L2_CID_AUDIO_MUTE: 313 case V4L2_CID_AUDIO_MUTE:
@@ -414,7 +414,7 @@ static int __init terratec_init(void)
414 return -EBUSY; 414 return -EBUSY;
415 } 415 }
416 416
417 terratec_radio.priv=&terratec_unit; 417 video_set_drvdata(&terratec_radio, &terratec_unit);
418 418
419 spin_lock_init(&lock); 419 spin_lock_init(&lock);
420 420