diff options
-rw-r--r-- | drivers/media/common/tuners/tda9887.c | 2 | ||||
-rw-r--r-- | drivers/media/common/tuners/tuner-simple.c | 2 | ||||
-rw-r--r-- | drivers/media/video/cpia2/cpia2_core.c | 1 | ||||
-rw-r--r-- | drivers/media/video/ov511.c | 34 | ||||
-rw-r--r-- | drivers/media/video/pwc/pwc-if.c | 11 | ||||
-rw-r--r-- | drivers/media/video/stk-webcam.c | 14 | ||||
-rw-r--r-- | drivers/media/video/stv680.c | 47 | ||||
-rw-r--r-- | drivers/media/video/usbvideo/vicam.c | 1 | ||||
-rw-r--r-- | drivers/media/video/usbvision/usbvision-core.c | 1 | ||||
-rw-r--r-- | drivers/media/video/usbvision/usbvision-video.c | 1 | ||||
-rw-r--r-- | drivers/media/video/vpx3220.c | 2 | ||||
-rw-r--r-- | include/media/v4l2-dev.h | 25 |
12 files changed, 60 insertions, 81 deletions
diff --git a/drivers/media/common/tuners/tda9887.c b/drivers/media/common/tuners/tda9887.c index a0545ba957b0..72abf0b73486 100644 --- a/drivers/media/common/tuners/tda9887.c +++ b/drivers/media/common/tuners/tda9887.c | |||
@@ -6,7 +6,7 @@ | |||
6 | #include <linux/errno.h> | 6 | #include <linux/errno.h> |
7 | #include <linux/slab.h> | 7 | #include <linux/slab.h> |
8 | #include <linux/delay.h> | 8 | #include <linux/delay.h> |
9 | #include <linux/videodev.h> | 9 | #include <linux/videodev2.h> |
10 | #include <media/v4l2-common.h> | 10 | #include <media/v4l2-common.h> |
11 | #include <media/tuner.h> | 11 | #include <media/tuner.h> |
12 | #include "tuner-i2c.h" | 12 | #include "tuner-i2c.h" |
diff --git a/drivers/media/common/tuners/tuner-simple.c b/drivers/media/common/tuners/tuner-simple.c index 266c255cf0d8..597e47f5d69c 100644 --- a/drivers/media/common/tuners/tuner-simple.c +++ b/drivers/media/common/tuners/tuner-simple.c | |||
@@ -6,7 +6,7 @@ | |||
6 | */ | 6 | */ |
7 | #include <linux/delay.h> | 7 | #include <linux/delay.h> |
8 | #include <linux/i2c.h> | 8 | #include <linux/i2c.h> |
9 | #include <linux/videodev.h> | 9 | #include <linux/videodev2.h> |
10 | #include <media/tuner.h> | 10 | #include <media/tuner.h> |
11 | #include <media/v4l2-common.h> | 11 | #include <media/v4l2-common.h> |
12 | #include <media/tuner-types.h> | 12 | #include <media/tuner-types.h> |
diff --git a/drivers/media/video/cpia2/cpia2_core.c b/drivers/media/video/cpia2/cpia2_core.c index f2e8b1c82c66..af8b9ec8e358 100644 --- a/drivers/media/video/cpia2/cpia2_core.c +++ b/drivers/media/video/cpia2/cpia2_core.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include "cpia2.h" | 32 | #include "cpia2.h" |
33 | 33 | ||
34 | #include <linux/slab.h> | 34 | #include <linux/slab.h> |
35 | #include <linux/mm.h> | ||
35 | #include <linux/vmalloc.h> | 36 | #include <linux/vmalloc.h> |
36 | #include <linux/firmware.h> | 37 | #include <linux/firmware.h> |
37 | 38 | ||
diff --git a/drivers/media/video/ov511.c b/drivers/media/video/ov511.c index f732b035570f..2374ebc084d4 100644 --- a/drivers/media/video/ov511.c +++ b/drivers/media/video/ov511.c | |||
@@ -5660,43 +5660,43 @@ static int ov_create_sysfs(struct video_device *vdev) | |||
5660 | { | 5660 | { |
5661 | int rc; | 5661 | int rc; |
5662 | 5662 | ||
5663 | rc = video_device_create_file(vdev, &dev_attr_custom_id); | 5663 | rc = device_create_file(&vdev->dev, &dev_attr_custom_id); |
5664 | if (rc) goto err; | 5664 | if (rc) goto err; |
5665 | rc = video_device_create_file(vdev, &dev_attr_model); | 5665 | rc = device_create_file(&vdev->dev, &dev_attr_model); |
5666 | if (rc) goto err_id; | 5666 | if (rc) goto err_id; |
5667 | rc = video_device_create_file(vdev, &dev_attr_bridge); | 5667 | rc = device_create_file(&vdev->dev, &dev_attr_bridge); |
5668 | if (rc) goto err_model; | 5668 | if (rc) goto err_model; |
5669 | rc = video_device_create_file(vdev, &dev_attr_sensor); | 5669 | rc = device_create_file(&vdev->dev, &dev_attr_sensor); |
5670 | if (rc) goto err_bridge; | 5670 | if (rc) goto err_bridge; |
5671 | rc = video_device_create_file(vdev, &dev_attr_brightness); | 5671 | rc = device_create_file(&vdev->dev, &dev_attr_brightness); |
5672 | if (rc) goto err_sensor; | 5672 | if (rc) goto err_sensor; |
5673 | rc = video_device_create_file(vdev, &dev_attr_saturation); | 5673 | rc = device_create_file(&vdev->dev, &dev_attr_saturation); |
5674 | if (rc) goto err_bright; | 5674 | if (rc) goto err_bright; |
5675 | rc = video_device_create_file(vdev, &dev_attr_contrast); | 5675 | rc = device_create_file(&vdev->dev, &dev_attr_contrast); |
5676 | if (rc) goto err_sat; | 5676 | if (rc) goto err_sat; |
5677 | rc = video_device_create_file(vdev, &dev_attr_hue); | 5677 | rc = device_create_file(&vdev->dev, &dev_attr_hue); |
5678 | if (rc) goto err_contrast; | 5678 | if (rc) goto err_contrast; |
5679 | rc = video_device_create_file(vdev, &dev_attr_exposure); | 5679 | rc = device_create_file(&vdev->dev, &dev_attr_exposure); |
5680 | if (rc) goto err_hue; | 5680 | if (rc) goto err_hue; |
5681 | 5681 | ||
5682 | return 0; | 5682 | return 0; |
5683 | 5683 | ||
5684 | err_hue: | 5684 | err_hue: |
5685 | video_device_remove_file(vdev, &dev_attr_hue); | 5685 | device_remove_file(&vdev->dev, &dev_attr_hue); |
5686 | err_contrast: | 5686 | err_contrast: |
5687 | video_device_remove_file(vdev, &dev_attr_contrast); | 5687 | device_remove_file(&vdev->dev, &dev_attr_contrast); |
5688 | err_sat: | 5688 | err_sat: |
5689 | video_device_remove_file(vdev, &dev_attr_saturation); | 5689 | device_remove_file(&vdev->dev, &dev_attr_saturation); |
5690 | err_bright: | 5690 | err_bright: |
5691 | video_device_remove_file(vdev, &dev_attr_brightness); | 5691 | device_remove_file(&vdev->dev, &dev_attr_brightness); |
5692 | err_sensor: | 5692 | err_sensor: |
5693 | video_device_remove_file(vdev, &dev_attr_sensor); | 5693 | device_remove_file(&vdev->dev, &dev_attr_sensor); |
5694 | err_bridge: | 5694 | err_bridge: |
5695 | video_device_remove_file(vdev, &dev_attr_bridge); | 5695 | device_remove_file(&vdev->dev, &dev_attr_bridge); |
5696 | err_model: | 5696 | err_model: |
5697 | video_device_remove_file(vdev, &dev_attr_model); | 5697 | device_remove_file(&vdev->dev, &dev_attr_model); |
5698 | err_id: | 5698 | err_id: |
5699 | video_device_remove_file(vdev, &dev_attr_custom_id); | 5699 | device_remove_file(&vdev->dev, &dev_attr_custom_id); |
5700 | err: | 5700 | err: |
5701 | return rc; | 5701 | return rc; |
5702 | } | 5702 | } |
diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c index 4625b265bf98..436a47caf52d 100644 --- a/drivers/media/video/pwc/pwc-if.c +++ b/drivers/media/video/pwc/pwc-if.c | |||
@@ -1047,19 +1047,20 @@ static int pwc_create_sysfs_files(struct video_device *vdev) | |||
1047 | struct pwc_device *pdev = video_get_drvdata(vdev); | 1047 | struct pwc_device *pdev = video_get_drvdata(vdev); |
1048 | int rc; | 1048 | int rc; |
1049 | 1049 | ||
1050 | rc = video_device_create_file(vdev, &dev_attr_button); | 1050 | rc = device_create_file(&vdev->dev, &dev_attr_button); |
1051 | if (rc) | 1051 | if (rc) |
1052 | goto err; | 1052 | goto err; |
1053 | if (pdev->features & FEATURE_MOTOR_PANTILT) { | 1053 | if (pdev->features & FEATURE_MOTOR_PANTILT) { |
1054 | rc = video_device_create_file(vdev, &dev_attr_pan_tilt); | 1054 | rc = device_create_file(&vdev->dev, &dev_attr_pan_tilt); |
1055 | if (rc) goto err_button; | 1055 | if (rc) goto err_button; |
1056 | } | 1056 | } |
1057 | 1057 | ||
1058 | return 0; | 1058 | return 0; |
1059 | 1059 | ||
1060 | err_button: | 1060 | err_button: |
1061 | video_device_remove_file(vdev, &dev_attr_button); | 1061 | device_remove_file(&vdev->dev, &dev_attr_button); |
1062 | err: | 1062 | err: |
1063 | PWC_ERROR("Could not create sysfs files.\n"); | ||
1063 | return rc; | 1064 | return rc; |
1064 | } | 1065 | } |
1065 | 1066 | ||
@@ -1067,8 +1068,8 @@ static void pwc_remove_sysfs_files(struct video_device *vdev) | |||
1067 | { | 1068 | { |
1068 | struct pwc_device *pdev = video_get_drvdata(vdev); | 1069 | struct pwc_device *pdev = video_get_drvdata(vdev); |
1069 | if (pdev->features & FEATURE_MOTOR_PANTILT) | 1070 | if (pdev->features & FEATURE_MOTOR_PANTILT) |
1070 | video_device_remove_file(vdev, &dev_attr_pan_tilt); | 1071 | device_remove_file(&vdev->dev, &dev_attr_pan_tilt); |
1071 | video_device_remove_file(vdev, &dev_attr_button); | 1072 | device_remove_file(&vdev->dev, &dev_attr_button); |
1072 | } | 1073 | } |
1073 | 1074 | ||
1074 | #ifdef CONFIG_USB_PWC_DEBUG | 1075 | #ifdef CONFIG_USB_PWC_DEBUG |
diff --git a/drivers/media/video/stk-webcam.c b/drivers/media/video/stk-webcam.c index 8d5fa95ad95a..8aa56fe02546 100644 --- a/drivers/media/video/stk-webcam.c +++ b/drivers/media/video/stk-webcam.c | |||
@@ -341,17 +341,19 @@ static int stk_create_sysfs_files(struct video_device *vdev) | |||
341 | { | 341 | { |
342 | int ret; | 342 | int ret; |
343 | 343 | ||
344 | ret = video_device_create_file(vdev, &dev_attr_brightness); | 344 | ret = device_create_file(&vdev->dev, &dev_attr_brightness); |
345 | ret += video_device_create_file(vdev, &dev_attr_hflip); | 345 | ret += device_create_file(&vdev->dev, &dev_attr_hflip); |
346 | ret += video_device_create_file(vdev, &dev_attr_vflip); | 346 | ret += device_create_file(&vdev->dev, &dev_attr_vflip); |
347 | if (ret) | ||
348 | STK_WARNING("Could not create sysfs files\n"); | ||
347 | return ret; | 349 | return ret; |
348 | } | 350 | } |
349 | 351 | ||
350 | static void stk_remove_sysfs_files(struct video_device *vdev) | 352 | static void stk_remove_sysfs_files(struct video_device *vdev) |
351 | { | 353 | { |
352 | video_device_remove_file(vdev, &dev_attr_brightness); | 354 | device_remove_file(&vdev->dev, &dev_attr_brightness); |
353 | video_device_remove_file(vdev, &dev_attr_hflip); | 355 | device_remove_file(&vdev->dev, &dev_attr_hflip); |
354 | video_device_remove_file(vdev, &dev_attr_vflip); | 356 | device_remove_file(&vdev->dev, &dev_attr_vflip); |
355 | } | 357 | } |
356 | 358 | ||
357 | #else | 359 | #else |
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 | ||
547 | err_dropped: | 547 | err_dropped: |
548 | video_device_remove_file(vdev, &dev_attr_packets_dropped); | 548 | device_remove_file(&vdev->dev, &dev_attr_packets_dropped); |
549 | err_framread: | 549 | err_framread: |
550 | video_device_remove_file(vdev, &dev_attr_frames_read); | 550 | device_remove_file(&vdev->dev, &dev_attr_frames_read); |
551 | err_framtot: | 551 | err_framtot: |
552 | video_device_remove_file(vdev, &dev_attr_frames_total); | 552 | device_remove_file(&vdev->dev, &dev_attr_frames_total); |
553 | err_pal: | 553 | err_pal: |
554 | video_device_remove_file(vdev, &dev_attr_palette); | 554 | device_remove_file(&vdev->dev, &dev_attr_palette); |
555 | err_stream: | 555 | err_stream: |
556 | video_device_remove_file(vdev, &dev_attr_streaming); | 556 | device_remove_file(&vdev->dev, &dev_attr_streaming); |
557 | err_inuse: | 557 | err_inuse: |
558 | video_device_remove_file(vdev, &dev_attr_in_use); | 558 | device_remove_file(&vdev->dev, &dev_attr_in_use); |
559 | err_model: | 559 | err_model: |
560 | video_device_remove_file(vdev, &dev_attr_model); | 560 | device_remove_file(&vdev->dev, &dev_attr_model); |
561 | err: | 561 | err: |
562 | PDEBUG(0, "STV(e): Could not create sysfs files"); | ||
562 | return rc; | 563 | return rc; |
563 | } | 564 | } |
564 | 565 | ||
565 | static void stv680_remove_sysfs_files(struct video_device *vdev) | 566 | static 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 | /******************************************************************** |
diff --git a/drivers/media/video/usbvideo/vicam.c b/drivers/media/video/usbvideo/vicam.c index e2dec6fb0da9..b8e8fceee525 100644 --- a/drivers/media/video/usbvideo/vicam.c +++ b/drivers/media/video/usbvideo/vicam.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/videodev.h> | 41 | #include <linux/videodev.h> |
42 | #include <linux/usb.h> | 42 | #include <linux/usb.h> |
43 | #include <linux/vmalloc.h> | 43 | #include <linux/vmalloc.h> |
44 | #include <linux/mm.h> | ||
44 | #include <linux/slab.h> | 45 | #include <linux/slab.h> |
45 | #include <linux/mutex.h> | 46 | #include <linux/mutex.h> |
46 | #include <linux/firmware.h> | 47 | #include <linux/firmware.h> |
diff --git a/drivers/media/video/usbvision/usbvision-core.c b/drivers/media/video/usbvision/usbvision-core.c index 7d53de531c44..c317ed7a8482 100644 --- a/drivers/media/video/usbvision/usbvision-core.c +++ b/drivers/media/video/usbvision/usbvision-core.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <linux/mm.h> | 30 | #include <linux/mm.h> |
31 | #include <linux/utsname.h> | 31 | #include <linux/utsname.h> |
32 | #include <linux/highmem.h> | 32 | #include <linux/highmem.h> |
33 | #include <linux/videodev.h> | ||
34 | #include <linux/vmalloc.h> | 33 | #include <linux/vmalloc.h> |
35 | #include <linux/module.h> | 34 | #include <linux/module.h> |
36 | #include <linux/init.h> | 35 | #include <linux/init.h> |
diff --git a/drivers/media/video/usbvision/usbvision-video.c b/drivers/media/video/usbvision/usbvision-video.c index e97f955aad67..a65e5db0a325 100644 --- a/drivers/media/video/usbvision/usbvision-video.c +++ b/drivers/media/video/usbvision/usbvision-video.c | |||
@@ -53,7 +53,6 @@ | |||
53 | #include <linux/mm.h> | 53 | #include <linux/mm.h> |
54 | #include <linux/utsname.h> | 54 | #include <linux/utsname.h> |
55 | #include <linux/highmem.h> | 55 | #include <linux/highmem.h> |
56 | #include <linux/videodev.h> | ||
57 | #include <linux/vmalloc.h> | 56 | #include <linux/vmalloc.h> |
58 | #include <linux/module.h> | 57 | #include <linux/module.h> |
59 | #include <linux/init.h> | 58 | #include <linux/init.h> |
diff --git a/drivers/media/video/vpx3220.c b/drivers/media/video/vpx3220.c index 3b83d4e2b2c3..35293029da02 100644 --- a/drivers/media/video/vpx3220.c +++ b/drivers/media/video/vpx3220.c | |||
@@ -33,7 +33,7 @@ | |||
33 | 33 | ||
34 | #define I2C_NAME(x) (x)->name | 34 | #define I2C_NAME(x) (x)->name |
35 | 35 | ||
36 | #include <linux/videodev2.h> | 36 | #include <linux/videodev.h> |
37 | #include <media/v4l2-common.h> | 37 | #include <media/v4l2-common.h> |
38 | #include <linux/video_decoder.h> | 38 | #include <linux/video_decoder.h> |
39 | 39 | ||
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h index ae2b1e6bdf47..2fe38858516b 100644 --- a/include/media/v4l2-dev.h +++ b/include/media/v4l2-dev.h | |||
@@ -16,11 +16,7 @@ | |||
16 | #include <linux/device.h> | 16 | #include <linux/device.h> |
17 | #include <linux/mutex.h> | 17 | #include <linux/mutex.h> |
18 | #include <linux/compiler.h> /* need __user */ | 18 | #include <linux/compiler.h> /* need __user */ |
19 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
20 | #include <linux/videodev.h> | ||
21 | #else | ||
22 | #include <linux/videodev2.h> | 19 | #include <linux/videodev2.h> |
23 | #endif | ||
24 | 20 | ||
25 | #define VIDEO_MAJOR 81 | 21 | #define VIDEO_MAJOR 81 |
26 | /* Minor device allocation */ | 22 | /* Minor device allocation */ |
@@ -102,27 +98,6 @@ void video_unregister_device(struct video_device *); | |||
102 | struct video_device *video_device_alloc(void); | 98 | struct video_device *video_device_alloc(void); |
103 | void video_device_release(struct video_device *vfd); | 99 | void video_device_release(struct video_device *vfd); |
104 | 100 | ||
105 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
106 | #include <linux/mm.h> | ||
107 | |||
108 | static inline int __must_check | ||
109 | video_device_create_file(struct video_device *vfd, | ||
110 | struct device_attribute *attr) | ||
111 | { | ||
112 | int ret = device_create_file(&vfd->dev, attr); | ||
113 | if (ret < 0) | ||
114 | printk(KERN_WARNING "%s error: %d\n", __func__, ret); | ||
115 | return ret; | ||
116 | } | ||
117 | static inline void | ||
118 | video_device_remove_file(struct video_device *vfd, | ||
119 | struct device_attribute *attr) | ||
120 | { | ||
121 | device_remove_file(&vfd->dev, attr); | ||
122 | } | ||
123 | |||
124 | #endif /* CONFIG_VIDEO_V4L1_COMPAT */ | ||
125 | |||
126 | #ifdef OBSOLETE_DEVDATA /* to be removed soon */ | 101 | #ifdef OBSOLETE_DEVDATA /* to be removed soon */ |
127 | /* helper functions to access driver private data. */ | 102 | /* helper functions to access driver private data. */ |
128 | static inline void *video_get_drvdata(struct video_device *dev) | 103 | static inline void *video_get_drvdata(struct video_device *dev) |