aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/stv680.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/stv680.c')
-rw-r--r--drivers/media/video/stv680.c47
1 files changed, 24 insertions, 23 deletions
diff --git a/drivers/media/video/stv680.c b/drivers/media/video/stv680.c
index fdcb58b0c121..9053d5a0b1c3 100644
--- a/drivers/media/video/stv680.c
+++ b/drivers/media/video/stv680.c
@@ -525,53 +525,54 @@ static int stv680_create_sysfs_files(struct video_device *vdev)
525{ 525{
526 int rc; 526 int rc;
527 527
528 rc = video_device_create_file(vdev, &dev_attr_model); 528 rc = device_create_file(&vdev->dev, &dev_attr_model);
529 if (rc) goto err; 529 if (rc) goto err;
530 rc = video_device_create_file(vdev, &dev_attr_in_use); 530 rc = device_create_file(&vdev->dev, &dev_attr_in_use);
531 if (rc) goto err_model; 531 if (rc) goto err_model;
532 rc = video_device_create_file(vdev, &dev_attr_streaming); 532 rc = device_create_file(&vdev->dev, &dev_attr_streaming);
533 if (rc) goto err_inuse; 533 if (rc) goto err_inuse;
534 rc = video_device_create_file(vdev, &dev_attr_palette); 534 rc = device_create_file(&vdev->dev, &dev_attr_palette);
535 if (rc) goto err_stream; 535 if (rc) goto err_stream;
536 rc = video_device_create_file(vdev, &dev_attr_frames_total); 536 rc = device_create_file(&vdev->dev, &dev_attr_frames_total);
537 if (rc) goto err_pal; 537 if (rc) goto err_pal;
538 rc = video_device_create_file(vdev, &dev_attr_frames_read); 538 rc = device_create_file(&vdev->dev, &dev_attr_frames_read);
539 if (rc) goto err_framtot; 539 if (rc) goto err_framtot;
540 rc = video_device_create_file(vdev, &dev_attr_packets_dropped); 540 rc = device_create_file(&vdev->dev, &dev_attr_packets_dropped);
541 if (rc) goto err_framread; 541 if (rc) goto err_framread;
542 rc = video_device_create_file(vdev, &dev_attr_decoding_errors); 542 rc = device_create_file(&vdev->dev, &dev_attr_decoding_errors);
543 if (rc) goto err_dropped; 543 if (rc) goto err_dropped;
544 544
545 return 0; 545 return 0;
546 546
547err_dropped: 547err_dropped:
548 video_device_remove_file(vdev, &dev_attr_packets_dropped); 548 device_remove_file(&vdev->dev, &dev_attr_packets_dropped);
549err_framread: 549err_framread:
550 video_device_remove_file(vdev, &dev_attr_frames_read); 550 device_remove_file(&vdev->dev, &dev_attr_frames_read);
551err_framtot: 551err_framtot:
552 video_device_remove_file(vdev, &dev_attr_frames_total); 552 device_remove_file(&vdev->dev, &dev_attr_frames_total);
553err_pal: 553err_pal:
554 video_device_remove_file(vdev, &dev_attr_palette); 554 device_remove_file(&vdev->dev, &dev_attr_palette);
555err_stream: 555err_stream:
556 video_device_remove_file(vdev, &dev_attr_streaming); 556 device_remove_file(&vdev->dev, &dev_attr_streaming);
557err_inuse: 557err_inuse:
558 video_device_remove_file(vdev, &dev_attr_in_use); 558 device_remove_file(&vdev->dev, &dev_attr_in_use);
559err_model: 559err_model:
560 video_device_remove_file(vdev, &dev_attr_model); 560 device_remove_file(&vdev->dev, &dev_attr_model);
561err: 561err:
562 PDEBUG(0, "STV(e): Could not create sysfs files");
562 return rc; 563 return rc;
563} 564}
564 565
565static void stv680_remove_sysfs_files(struct video_device *vdev) 566static void stv680_remove_sysfs_files(struct video_device *vdev)
566{ 567{
567 video_device_remove_file(vdev, &dev_attr_model); 568 device_remove_file(&vdev->dev, &dev_attr_model);
568 video_device_remove_file(vdev, &dev_attr_in_use); 569 device_remove_file(&vdev->dev, &dev_attr_in_use);
569 video_device_remove_file(vdev, &dev_attr_streaming); 570 device_remove_file(&vdev->dev, &dev_attr_streaming);
570 video_device_remove_file(vdev, &dev_attr_palette); 571 device_remove_file(&vdev->dev, &dev_attr_palette);
571 video_device_remove_file(vdev, &dev_attr_frames_total); 572 device_remove_file(&vdev->dev, &dev_attr_frames_total);
572 video_device_remove_file(vdev, &dev_attr_frames_read); 573 device_remove_file(&vdev->dev, &dev_attr_frames_read);
573 video_device_remove_file(vdev, &dev_attr_packets_dropped); 574 device_remove_file(&vdev->dev, &dev_attr_packets_dropped);
574 video_device_remove_file(vdev, &dev_attr_decoding_errors); 575 device_remove_file(&vdev->dev, &dev_attr_decoding_errors);
575} 576}
576 577
577/******************************************************************** 578/********************************************************************