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 | |
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')
-rw-r--r-- | drivers/media/radio/radio-aimslab.c | 12 | ||||
-rw-r--r-- | drivers/media/radio/radio-aztech.c | 12 | ||||
-rw-r--r-- | drivers/media/radio/radio-gemtek-pci.c | 12 | ||||
-rw-r--r-- | drivers/media/radio/radio-gemtek.c | 10 | ||||
-rw-r--r-- | drivers/media/radio/radio-maxiradio.c | 12 | ||||
-rw-r--r-- | drivers/media/radio/radio-rtrack2.c | 12 | ||||
-rw-r--r-- | drivers/media/radio/radio-sf16fmi.c | 12 | ||||
-rw-r--r-- | drivers/media/radio/radio-sf16fmr2.c | 12 | ||||
-rw-r--r-- | drivers/media/radio/radio-terratec.c | 12 | ||||
-rw-r--r-- | drivers/media/radio/radio-typhoon.c | 10 | ||||
-rw-r--r-- | drivers/media/radio/radio-zoltrix.c | 12 |
11 files changed, 64 insertions, 64 deletions
diff --git a/drivers/media/radio/radio-aimslab.c b/drivers/media/radio/radio-aimslab.c index 59fdaf85e41b..62cc6874d63f 100644 --- a/drivers/media/radio/radio-aimslab.c +++ b/drivers/media/radio/radio-aimslab.c | |||
@@ -247,7 +247,7 @@ static int vidioc_g_tuner(struct file *file, void *priv, | |||
247 | struct v4l2_tuner *v) | 247 | struct v4l2_tuner *v) |
248 | { | 248 | { |
249 | struct video_device *dev = video_devdata(file); | 249 | struct video_device *dev = video_devdata(file); |
250 | struct rt_device *rt = dev->priv; | 250 | struct rt_device *rt = video_get_drvdata(dev); |
251 | 251 | ||
252 | if (v->index > 0) | 252 | if (v->index > 0) |
253 | return -EINVAL; | 253 | return -EINVAL; |
@@ -275,7 +275,7 @@ static int vidioc_s_frequency(struct file *file, void *priv, | |||
275 | struct v4l2_frequency *f) | 275 | struct v4l2_frequency *f) |
276 | { | 276 | { |
277 | struct video_device *dev = video_devdata(file); | 277 | struct video_device *dev = video_devdata(file); |
278 | struct rt_device *rt = dev->priv; | 278 | struct rt_device *rt = video_get_drvdata(dev); |
279 | 279 | ||
280 | rt->curfreq = f->frequency; | 280 | rt->curfreq = f->frequency; |
281 | rt_setfreq(rt, rt->curfreq); | 281 | rt_setfreq(rt, rt->curfreq); |
@@ -286,7 +286,7 @@ static int vidioc_g_frequency(struct file *file, void *priv, | |||
286 | struct v4l2_frequency *f) | 286 | struct v4l2_frequency *f) |
287 | { | 287 | { |
288 | struct video_device *dev = video_devdata(file); | 288 | struct video_device *dev = video_devdata(file); |
289 | struct rt_device *rt = dev->priv; | 289 | struct rt_device *rt = video_get_drvdata(dev); |
290 | 290 | ||
291 | f->type = V4L2_TUNER_RADIO; | 291 | f->type = V4L2_TUNER_RADIO; |
292 | f->frequency = rt->curfreq; | 292 | f->frequency = rt->curfreq; |
@@ -312,7 +312,7 @@ static int vidioc_g_ctrl(struct file *file, void *priv, | |||
312 | struct v4l2_control *ctrl) | 312 | struct v4l2_control *ctrl) |
313 | { | 313 | { |
314 | struct video_device *dev = video_devdata(file); | 314 | struct video_device *dev = video_devdata(file); |
315 | struct rt_device *rt = dev->priv; | 315 | struct rt_device *rt = video_get_drvdata(dev); |
316 | 316 | ||
317 | switch (ctrl->id) { | 317 | switch (ctrl->id) { |
318 | case V4L2_CID_AUDIO_MUTE: | 318 | case V4L2_CID_AUDIO_MUTE: |
@@ -329,7 +329,7 @@ static int vidioc_s_ctrl(struct file *file, void *priv, | |||
329 | struct v4l2_control *ctrl) | 329 | struct v4l2_control *ctrl) |
330 | { | 330 | { |
331 | struct video_device *dev = video_devdata(file); | 331 | struct video_device *dev = video_devdata(file); |
332 | struct rt_device *rt = dev->priv; | 332 | struct rt_device *rt = video_get_drvdata(dev); |
333 | 333 | ||
334 | switch (ctrl->id) { | 334 | switch (ctrl->id) { |
335 | case V4L2_CID_AUDIO_MUTE: | 335 | case V4L2_CID_AUDIO_MUTE: |
@@ -437,7 +437,7 @@ static int __init rtrack_init(void) | |||
437 | return -EBUSY; | 437 | return -EBUSY; |
438 | } | 438 | } |
439 | 439 | ||
440 | rtrack_radio.priv=&rtrack_unit; | 440 | video_set_drvdata(&rtrack_radio, &rtrack_unit); |
441 | 441 | ||
442 | if (video_register_device(&rtrack_radio, VFL_TYPE_RADIO, radio_nr) < 0) { | 442 | if (video_register_device(&rtrack_radio, VFL_TYPE_RADIO, radio_nr) < 0) { |
443 | release_region(io, 2); | 443 | release_region(io, 2); |
diff --git a/drivers/media/radio/radio-aztech.c b/drivers/media/radio/radio-aztech.c index ddd96295a9fe..5dd5e349ef47 100644 --- a/drivers/media/radio/radio-aztech.c +++ b/drivers/media/radio/radio-aztech.c | |||
@@ -197,7 +197,7 @@ static int vidioc_g_tuner (struct file *file, void *priv, | |||
197 | struct v4l2_tuner *v) | 197 | struct v4l2_tuner *v) |
198 | { | 198 | { |
199 | struct video_device *dev = video_devdata(file); | 199 | struct video_device *dev = video_devdata(file); |
200 | struct az_device *az = dev->priv; | 200 | struct az_device *az = video_get_drvdata(dev); |
201 | 201 | ||
202 | if (v->index > 0) | 202 | if (v->index > 0) |
203 | return -EINVAL; | 203 | return -EINVAL; |
@@ -266,7 +266,7 @@ static int vidioc_s_frequency (struct file *file, void *priv, | |||
266 | struct v4l2_frequency *f) | 266 | struct v4l2_frequency *f) |
267 | { | 267 | { |
268 | struct video_device *dev = video_devdata(file); | 268 | struct video_device *dev = video_devdata(file); |
269 | struct az_device *az = dev->priv; | 269 | struct az_device *az = video_get_drvdata(dev); |
270 | 270 | ||
271 | az->curfreq = f->frequency; | 271 | az->curfreq = f->frequency; |
272 | az_setfreq(az, az->curfreq); | 272 | az_setfreq(az, az->curfreq); |
@@ -277,7 +277,7 @@ static int vidioc_g_frequency (struct file *file, void *priv, | |||
277 | struct v4l2_frequency *f) | 277 | struct v4l2_frequency *f) |
278 | { | 278 | { |
279 | struct video_device *dev = video_devdata(file); | 279 | struct video_device *dev = video_devdata(file); |
280 | struct az_device *az = dev->priv; | 280 | struct az_device *az = video_get_drvdata(dev); |
281 | 281 | ||
282 | f->type = V4L2_TUNER_RADIO; | 282 | f->type = V4L2_TUNER_RADIO; |
283 | f->frequency = az->curfreq; | 283 | f->frequency = az->curfreq; |
@@ -304,7 +304,7 @@ static int vidioc_g_ctrl (struct file *file, void *priv, | |||
304 | struct v4l2_control *ctrl) | 304 | struct v4l2_control *ctrl) |
305 | { | 305 | { |
306 | struct video_device *dev = video_devdata(file); | 306 | struct video_device *dev = video_devdata(file); |
307 | struct az_device *az = dev->priv; | 307 | struct az_device *az = video_get_drvdata(dev); |
308 | 308 | ||
309 | switch (ctrl->id) { | 309 | switch (ctrl->id) { |
310 | case V4L2_CID_AUDIO_MUTE: | 310 | case V4L2_CID_AUDIO_MUTE: |
@@ -324,7 +324,7 @@ static int vidioc_s_ctrl (struct file *file, void *priv, | |||
324 | struct v4l2_control *ctrl) | 324 | struct v4l2_control *ctrl) |
325 | { | 325 | { |
326 | struct video_device *dev = video_devdata(file); | 326 | struct video_device *dev = video_devdata(file); |
327 | struct az_device *az = dev->priv; | 327 | struct az_device *az = video_get_drvdata(dev); |
328 | 328 | ||
329 | switch (ctrl->id) { | 329 | switch (ctrl->id) { |
330 | case V4L2_CID_AUDIO_MUTE: | 330 | case V4L2_CID_AUDIO_MUTE: |
@@ -405,7 +405,7 @@ static int __init aztech_init(void) | |||
405 | } | 405 | } |
406 | 406 | ||
407 | mutex_init(&lock); | 407 | mutex_init(&lock); |
408 | aztech_radio.priv=&aztech_unit; | 408 | video_set_drvdata(&aztech_radio, &aztech_unit); |
409 | 409 | ||
410 | if (video_register_device(&aztech_radio, VFL_TYPE_RADIO, radio_nr) < 0) { | 410 | if (video_register_device(&aztech_radio, VFL_TYPE_RADIO, radio_nr) < 0) { |
411 | release_region(io,2); | 411 | release_region(io,2); |
diff --git a/drivers/media/radio/radio-gemtek-pci.c b/drivers/media/radio/radio-gemtek-pci.c index d65fd287bde1..1f57f731c121 100644 --- a/drivers/media/radio/radio-gemtek-pci.c +++ b/drivers/media/radio/radio-gemtek-pci.c | |||
@@ -205,7 +205,7 @@ static int vidioc_g_tuner(struct file *file, void *priv, | |||
205 | struct v4l2_tuner *v) | 205 | struct v4l2_tuner *v) |
206 | { | 206 | { |
207 | struct video_device *dev = video_devdata(file); | 207 | struct video_device *dev = video_devdata(file); |
208 | struct gemtek_pci_card *card = dev->priv; | 208 | struct gemtek_pci_card *card = video_get_drvdata(dev); |
209 | 209 | ||
210 | if (v->index > 0) | 210 | if (v->index > 0) |
211 | return -EINVAL; | 211 | return -EINVAL; |
@@ -233,7 +233,7 @@ static int vidioc_s_frequency(struct file *file, void *priv, | |||
233 | struct v4l2_frequency *f) | 233 | struct v4l2_frequency *f) |
234 | { | 234 | { |
235 | struct video_device *dev = video_devdata(file); | 235 | struct video_device *dev = video_devdata(file); |
236 | struct gemtek_pci_card *card = dev->priv; | 236 | struct gemtek_pci_card *card = video_get_drvdata(dev); |
237 | 237 | ||
238 | if ( (f->frequency < GEMTEK_PCI_RANGE_LOW) || | 238 | if ( (f->frequency < GEMTEK_PCI_RANGE_LOW) || |
239 | (f->frequency > GEMTEK_PCI_RANGE_HIGH) ) | 239 | (f->frequency > GEMTEK_PCI_RANGE_HIGH) ) |
@@ -248,7 +248,7 @@ static int vidioc_g_frequency(struct file *file, void *priv, | |||
248 | struct v4l2_frequency *f) | 248 | struct v4l2_frequency *f) |
249 | { | 249 | { |
250 | struct video_device *dev = video_devdata(file); | 250 | struct video_device *dev = video_devdata(file); |
251 | struct gemtek_pci_card *card = dev->priv; | 251 | struct gemtek_pci_card *card = video_get_drvdata(dev); |
252 | 252 | ||
253 | f->type = V4L2_TUNER_RADIO; | 253 | f->type = V4L2_TUNER_RADIO; |
254 | f->frequency = card->current_frequency; | 254 | f->frequency = card->current_frequency; |
@@ -273,7 +273,7 @@ static int vidioc_g_ctrl(struct file *file, void *priv, | |||
273 | struct v4l2_control *ctrl) | 273 | struct v4l2_control *ctrl) |
274 | { | 274 | { |
275 | struct video_device *dev = video_devdata(file); | 275 | struct video_device *dev = video_devdata(file); |
276 | struct gemtek_pci_card *card = dev->priv; | 276 | struct gemtek_pci_card *card = video_get_drvdata(dev); |
277 | 277 | ||
278 | switch (ctrl->id) { | 278 | switch (ctrl->id) { |
279 | case V4L2_CID_AUDIO_MUTE: | 279 | case V4L2_CID_AUDIO_MUTE: |
@@ -293,7 +293,7 @@ static int vidioc_s_ctrl(struct file *file, void *priv, | |||
293 | struct v4l2_control *ctrl) | 293 | struct v4l2_control *ctrl) |
294 | { | 294 | { |
295 | struct video_device *dev = video_devdata(file); | 295 | struct video_device *dev = video_devdata(file); |
296 | struct gemtek_pci_card *card = dev->priv; | 296 | struct gemtek_pci_card *card = video_get_drvdata(dev); |
297 | 297 | ||
298 | switch (ctrl->id) { | 298 | switch (ctrl->id) { |
299 | case V4L2_CID_AUDIO_MUTE: | 299 | case V4L2_CID_AUDIO_MUTE: |
@@ -442,7 +442,7 @@ static int __devinit gemtek_pci_probe( struct pci_dev *pci_dev, const struct pci | |||
442 | } | 442 | } |
443 | 443 | ||
444 | card->videodev = devradio; | 444 | card->videodev = devradio; |
445 | devradio->priv = card; | 445 | video_set_drvdata(devradio, card); |
446 | gemtek_pci_mute( card ); | 446 | gemtek_pci_mute( card ); |
447 | 447 | ||
448 | printk( KERN_INFO "Gemtek PCI Radio (rev. %d) found at 0x%04x-0x%04x.\n", | 448 | printk( KERN_INFO "Gemtek PCI Radio (rev. %d) found at 0x%04x-0x%04x.\n", |
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); |
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!"); |
diff --git a/drivers/media/radio/radio-rtrack2.c b/drivers/media/radio/radio-rtrack2.c index 8fe820da73e8..4234f7ed0fc3 100644 --- a/drivers/media/radio/radio-rtrack2.c +++ b/drivers/media/radio/radio-rtrack2.c | |||
@@ -155,7 +155,7 @@ static int vidioc_g_tuner(struct file *file, void *priv, | |||
155 | struct v4l2_tuner *v) | 155 | struct v4l2_tuner *v) |
156 | { | 156 | { |
157 | struct video_device *dev = video_devdata(file); | 157 | struct video_device *dev = video_devdata(file); |
158 | struct rt_device *rt = dev->priv; | 158 | struct rt_device *rt = video_get_drvdata(dev); |
159 | 159 | ||
160 | if (v->index > 0) | 160 | if (v->index > 0) |
161 | return -EINVAL; | 161 | return -EINVAL; |
@@ -175,7 +175,7 @@ static int vidioc_s_frequency(struct file *file, void *priv, | |||
175 | struct v4l2_frequency *f) | 175 | struct v4l2_frequency *f) |
176 | { | 176 | { |
177 | struct video_device *dev = video_devdata(file); | 177 | struct video_device *dev = video_devdata(file); |
178 | struct rt_device *rt = dev->priv; | 178 | struct rt_device *rt = video_get_drvdata(dev); |
179 | 179 | ||
180 | rt->curfreq = f->frequency; | 180 | rt->curfreq = f->frequency; |
181 | rt_setfreq(rt, rt->curfreq); | 181 | rt_setfreq(rt, rt->curfreq); |
@@ -186,7 +186,7 @@ static int vidioc_g_frequency(struct file *file, void *priv, | |||
186 | struct v4l2_frequency *f) | 186 | struct v4l2_frequency *f) |
187 | { | 187 | { |
188 | struct video_device *dev = video_devdata(file); | 188 | struct video_device *dev = video_devdata(file); |
189 | struct rt_device *rt = dev->priv; | 189 | struct rt_device *rt = video_get_drvdata(dev); |
190 | 190 | ||
191 | f->type = V4L2_TUNER_RADIO; | 191 | f->type = V4L2_TUNER_RADIO; |
192 | f->frequency = rt->curfreq; | 192 | f->frequency = rt->curfreq; |
@@ -212,7 +212,7 @@ static int vidioc_g_ctrl(struct file *file, void *priv, | |||
212 | struct v4l2_control *ctrl) | 212 | struct v4l2_control *ctrl) |
213 | { | 213 | { |
214 | struct video_device *dev = video_devdata(file); | 214 | struct video_device *dev = video_devdata(file); |
215 | struct rt_device *rt = dev->priv; | 215 | struct rt_device *rt = video_get_drvdata(dev); |
216 | 216 | ||
217 | switch (ctrl->id) { | 217 | switch (ctrl->id) { |
218 | case V4L2_CID_AUDIO_MUTE: | 218 | case V4L2_CID_AUDIO_MUTE: |
@@ -232,7 +232,7 @@ static int vidioc_s_ctrl(struct file *file, void *priv, | |||
232 | struct v4l2_control *ctrl) | 232 | struct v4l2_control *ctrl) |
233 | { | 233 | { |
234 | struct video_device *dev = video_devdata(file); | 234 | struct video_device *dev = video_devdata(file); |
235 | struct rt_device *rt = dev->priv; | 235 | struct rt_device *rt = video_get_drvdata(dev); |
236 | 236 | ||
237 | switch (ctrl->id) { | 237 | switch (ctrl->id) { |
238 | case V4L2_CID_AUDIO_MUTE: | 238 | case V4L2_CID_AUDIO_MUTE: |
@@ -342,7 +342,7 @@ static int __init rtrack2_init(void) | |||
342 | return -EBUSY; | 342 | return -EBUSY; |
343 | } | 343 | } |
344 | 344 | ||
345 | rtrack2_radio.priv=&rtrack2_unit; | 345 | video_set_drvdata(&rtrack2_radio, &rtrack2_unit); |
346 | 346 | ||
347 | spin_lock_init(&lock); | 347 | spin_lock_init(&lock); |
348 | if (video_register_device(&rtrack2_radio, VFL_TYPE_RADIO, radio_nr) < 0) { | 348 | if (video_register_device(&rtrack2_radio, VFL_TYPE_RADIO, radio_nr) < 0) { |
diff --git a/drivers/media/radio/radio-sf16fmi.c b/drivers/media/radio/radio-sf16fmi.c index 6d865a7a91ec..810c366b73b0 100644 --- a/drivers/media/radio/radio-sf16fmi.c +++ b/drivers/media/radio/radio-sf16fmi.c | |||
@@ -148,7 +148,7 @@ static int vidioc_g_tuner(struct file *file, void *priv, | |||
148 | { | 148 | { |
149 | int mult; | 149 | int mult; |
150 | struct video_device *dev = video_devdata(file); | 150 | struct video_device *dev = video_devdata(file); |
151 | struct fmi_device *fmi = dev->priv; | 151 | struct fmi_device *fmi = video_get_drvdata(dev); |
152 | 152 | ||
153 | if (v->index > 0) | 153 | if (v->index > 0) |
154 | return -EINVAL; | 154 | return -EINVAL; |
@@ -177,7 +177,7 @@ static int vidioc_s_frequency(struct file *file, void *priv, | |||
177 | struct v4l2_frequency *f) | 177 | struct v4l2_frequency *f) |
178 | { | 178 | { |
179 | struct video_device *dev = video_devdata(file); | 179 | struct video_device *dev = video_devdata(file); |
180 | struct fmi_device *fmi = dev->priv; | 180 | struct fmi_device *fmi = video_get_drvdata(dev); |
181 | 181 | ||
182 | if (!(fmi->flags & V4L2_TUNER_CAP_LOW)) | 182 | if (!(fmi->flags & V4L2_TUNER_CAP_LOW)) |
183 | f->frequency *= 1000; | 183 | f->frequency *= 1000; |
@@ -195,7 +195,7 @@ static int vidioc_g_frequency(struct file *file, void *priv, | |||
195 | struct v4l2_frequency *f) | 195 | struct v4l2_frequency *f) |
196 | { | 196 | { |
197 | struct video_device *dev = video_devdata(file); | 197 | struct video_device *dev = video_devdata(file); |
198 | struct fmi_device *fmi = dev->priv; | 198 | struct fmi_device *fmi = video_get_drvdata(dev); |
199 | 199 | ||
200 | f->type = V4L2_TUNER_RADIO; | 200 | f->type = V4L2_TUNER_RADIO; |
201 | f->frequency = fmi->curfreq; | 201 | f->frequency = fmi->curfreq; |
@@ -223,7 +223,7 @@ static int vidioc_g_ctrl(struct file *file, void *priv, | |||
223 | struct v4l2_control *ctrl) | 223 | struct v4l2_control *ctrl) |
224 | { | 224 | { |
225 | struct video_device *dev = video_devdata(file); | 225 | struct video_device *dev = video_devdata(file); |
226 | struct fmi_device *fmi = dev->priv; | 226 | struct fmi_device *fmi = video_get_drvdata(dev); |
227 | 227 | ||
228 | switch (ctrl->id) { | 228 | switch (ctrl->id) { |
229 | case V4L2_CID_AUDIO_MUTE: | 229 | case V4L2_CID_AUDIO_MUTE: |
@@ -237,7 +237,7 @@ static int vidioc_s_ctrl(struct file *file, void *priv, | |||
237 | struct v4l2_control *ctrl) | 237 | struct v4l2_control *ctrl) |
238 | { | 238 | { |
239 | struct video_device *dev = video_devdata(file); | 239 | struct video_device *dev = video_devdata(file); |
240 | struct fmi_device *fmi = dev->priv; | 240 | struct fmi_device *fmi = video_get_drvdata(dev); |
241 | 241 | ||
242 | switch (ctrl->id) { | 242 | switch (ctrl->id) { |
243 | case V4L2_CID_AUDIO_MUTE: | 243 | case V4L2_CID_AUDIO_MUTE: |
@@ -386,7 +386,7 @@ static int __init fmi_init(void) | |||
386 | fmi_unit.curvol = 0; | 386 | fmi_unit.curvol = 0; |
387 | fmi_unit.curfreq = 0; | 387 | fmi_unit.curfreq = 0; |
388 | fmi_unit.flags = V4L2_TUNER_CAP_LOW; | 388 | fmi_unit.flags = V4L2_TUNER_CAP_LOW; |
389 | fmi_radio.priv = &fmi_unit; | 389 | video_set_drvdata(&fmi_radio, &fmi_unit); |
390 | 390 | ||
391 | mutex_init(&lock); | 391 | mutex_init(&lock); |
392 | 392 | ||
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 | ||
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 | ||
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; |
diff --git a/drivers/media/radio/radio-zoltrix.c b/drivers/media/radio/radio-zoltrix.c index 0d43e8401eb5..3a9a7772ae51 100644 --- a/drivers/media/radio/radio-zoltrix.c +++ b/drivers/media/radio/radio-zoltrix.c | |||
@@ -247,7 +247,7 @@ static int vidioc_g_tuner(struct file *file, void *priv, | |||
247 | struct v4l2_tuner *v) | 247 | struct v4l2_tuner *v) |
248 | { | 248 | { |
249 | struct video_device *dev = video_devdata(file); | 249 | struct video_device *dev = video_devdata(file); |
250 | struct zol_device *zol = dev->priv; | 250 | struct zol_device *zol = video_get_drvdata(dev); |
251 | 251 | ||
252 | if (v->index > 0) | 252 | if (v->index > 0) |
253 | return -EINVAL; | 253 | return -EINVAL; |
@@ -278,7 +278,7 @@ static int vidioc_s_frequency(struct file *file, void *priv, | |||
278 | struct v4l2_frequency *f) | 278 | struct v4l2_frequency *f) |
279 | { | 279 | { |
280 | struct video_device *dev = video_devdata(file); | 280 | struct video_device *dev = video_devdata(file); |
281 | struct zol_device *zol = dev->priv; | 281 | struct zol_device *zol = video_get_drvdata(dev); |
282 | 282 | ||
283 | zol->curfreq = f->frequency; | 283 | zol->curfreq = f->frequency; |
284 | zol_setfreq(zol, zol->curfreq); | 284 | zol_setfreq(zol, zol->curfreq); |
@@ -289,7 +289,7 @@ static int vidioc_g_frequency(struct file *file, void *priv, | |||
289 | struct v4l2_frequency *f) | 289 | struct v4l2_frequency *f) |
290 | { | 290 | { |
291 | struct video_device *dev = video_devdata(file); | 291 | struct video_device *dev = video_devdata(file); |
292 | struct zol_device *zol = dev->priv; | 292 | struct zol_device *zol = video_get_drvdata(dev); |
293 | 293 | ||
294 | f->type = V4L2_TUNER_RADIO; | 294 | f->type = V4L2_TUNER_RADIO; |
295 | f->frequency = zol->curfreq; | 295 | f->frequency = zol->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 zol_device *zol = dev->priv; | 318 | struct zol_device *zol = 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 zol_device *zol = dev->priv; | 335 | struct zol_device *zol = 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: |
@@ -453,7 +453,7 @@ static int __init zoltrix_init(void) | |||
453 | return -ENXIO; | 453 | return -ENXIO; |
454 | } | 454 | } |
455 | 455 | ||
456 | zoltrix_radio.priv = &zoltrix_unit; | 456 | video_set_drvdata(&zoltrix_radio, &zoltrix_unit); |
457 | if (!request_region(io, 2, "zoltrix")) { | 457 | if (!request_region(io, 2, "zoltrix")) { |
458 | printk(KERN_ERR "zoltrix: port 0x%x already in use\n", io); | 458 | printk(KERN_ERR "zoltrix: port 0x%x already in use\n", io); |
459 | return -EBUSY; | 459 | return -EBUSY; |