aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-07-25 06:39:54 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-26 12:18:11 -0400
commitf894dfd735237548d282d6fd55b6ebb4b2fd9ef2 (patch)
treebf7313318e8653d82ddfd001de742c48e93f1f9d /drivers/media/video
parent668acf32dfa1f1a975213f77bf17ee435f5a8edd (diff)
V4L/DVB (8488): videodev: remove some CONFIG_VIDEO_V4L1_COMPAT code from v4l2-dev.h
The video_device_create_file and video_device_remove_file functions can be removed from v4l2-dev.h, removing the dependency on videodev.h in v4l2-dev.h. Also removed a few more videodev.h includes that should have been videodev2.h. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video')
-rw-r--r--drivers/media/video/cpia2/cpia2_core.c1
-rw-r--r--drivers/media/video/ov511.c34
-rw-r--r--drivers/media/video/pwc/pwc-if.c11
-rw-r--r--drivers/media/video/stk-webcam.c14
-rw-r--r--drivers/media/video/stv680.c47
-rw-r--r--drivers/media/video/usbvideo/vicam.c1
-rw-r--r--drivers/media/video/usbvision/usbvision-core.c1
-rw-r--r--drivers/media/video/usbvision/usbvision-video.c1
-rw-r--r--drivers/media/video/vpx3220.c2
9 files changed, 58 insertions, 54 deletions
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
5684err_hue: 5684err_hue:
5685 video_device_remove_file(vdev, &dev_attr_hue); 5685 device_remove_file(&vdev->dev, &dev_attr_hue);
5686err_contrast: 5686err_contrast:
5687 video_device_remove_file(vdev, &dev_attr_contrast); 5687 device_remove_file(&vdev->dev, &dev_attr_contrast);
5688err_sat: 5688err_sat:
5689 video_device_remove_file(vdev, &dev_attr_saturation); 5689 device_remove_file(&vdev->dev, &dev_attr_saturation);
5690err_bright: 5690err_bright:
5691 video_device_remove_file(vdev, &dev_attr_brightness); 5691 device_remove_file(&vdev->dev, &dev_attr_brightness);
5692err_sensor: 5692err_sensor:
5693 video_device_remove_file(vdev, &dev_attr_sensor); 5693 device_remove_file(&vdev->dev, &dev_attr_sensor);
5694err_bridge: 5694err_bridge:
5695 video_device_remove_file(vdev, &dev_attr_bridge); 5695 device_remove_file(&vdev->dev, &dev_attr_bridge);
5696err_model: 5696err_model:
5697 video_device_remove_file(vdev, &dev_attr_model); 5697 device_remove_file(&vdev->dev, &dev_attr_model);
5698err_id: 5698err_id:
5699 video_device_remove_file(vdev, &dev_attr_custom_id); 5699 device_remove_file(&vdev->dev, &dev_attr_custom_id);
5700err: 5700err:
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
1060err_button: 1060err_button:
1061 video_device_remove_file(vdev, &dev_attr_button); 1061 device_remove_file(&vdev->dev, &dev_attr_button);
1062err: 1062err:
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
350static void stk_remove_sysfs_files(struct video_device *vdev) 352static 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
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/********************************************************************
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