diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-06-05 09:26:32 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-06-25 01:05:05 -0400 |
commit | 5e87efa3b29c105f81fea785babafb098e4e046d (patch) | |
tree | 7782d36699174e5985ee7ddca3860df130b0bbbb /include | |
parent | 839e4a4acb90fd34e3f6765bef6fe03ee82dbc58 (diff) |
V4L/DVB (4068): Removed all references to kernel stuff from videodev.h and videodev2.h
The videodev.h and videodev2.h describe the public API for V4L and V4L2.
It shouldn't have there any kernel-specific stuff. Those were moved to
v4l2-dev.h.
This patch removes some uneeded headers and include v4l2-common.h on all
V4L driver. This header includes device implementation of V4L2 API provided
on v4l2-dev.h as well as V4L2 internal ioctls that provides connections
between master driver and its i2c devices.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/videodev.h | 11 | ||||
-rw-r--r-- | include/linux/videodev2.h | 18 | ||||
-rw-r--r-- | include/media/ovcamchip.h | 1 | ||||
-rw-r--r-- | include/media/saa7146_vv.h | 2 | ||||
-rw-r--r-- | include/media/v4l2-dev.h | 8 |
5 files changed, 9 insertions, 31 deletions
diff --git a/include/linux/videodev.h b/include/linux/videodev.h index 5b6205544a7a..41bc7e9603cd 100644 --- a/include/linux/videodev.h +++ b/include/linux/videodev.h | |||
@@ -12,13 +12,6 @@ | |||
12 | #ifndef __LINUX_VIDEODEV_H | 12 | #ifndef __LINUX_VIDEODEV_H |
13 | #define __LINUX_VIDEODEV_H | 13 | #define __LINUX_VIDEODEV_H |
14 | 14 | ||
15 | #include <linux/types.h> | ||
16 | #include <linux/poll.h> | ||
17 | #include <linux/fs.h> | ||
18 | #include <linux/device.h> | ||
19 | #include <linux/mutex.h> | ||
20 | #include <linux/compiler.h> /* need __user */ | ||
21 | |||
22 | #define HAVE_V4L1 1 | 15 | #define HAVE_V4L1 1 |
23 | 16 | ||
24 | #include <linux/videodev2.h> | 17 | #include <linux/videodev2.h> |
@@ -343,10 +336,6 @@ struct video_code | |||
343 | #define VID_HARDWARE_SN9C102 38 | 336 | #define VID_HARDWARE_SN9C102 38 |
344 | #define VID_HARDWARE_ARV 39 | 337 | #define VID_HARDWARE_ARV 39 |
345 | 338 | ||
346 | #ifdef __KERNEL__ | ||
347 | #include <media/v4l2-dev.h> | ||
348 | #endif /* __KERNEL__ */ | ||
349 | |||
350 | #endif /* __LINUX_VIDEODEV_H */ | 339 | #endif /* __LINUX_VIDEODEV_H */ |
351 | 340 | ||
352 | /* | 341 | /* |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index bb58197ab6b9..795831d9f4d4 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -24,7 +24,6 @@ | |||
24 | * Common stuff for both V4L1 and V4L2 | 24 | * Common stuff for both V4L1 and V4L2 |
25 | * Moved from videodev.h | 25 | * Moved from videodev.h |
26 | */ | 26 | */ |
27 | |||
28 | #define VIDEO_MAX_FRAME 32 | 27 | #define VIDEO_MAX_FRAME 32 |
29 | 28 | ||
30 | #define VID_TYPE_CAPTURE 1 /* Can capture */ | 29 | #define VID_TYPE_CAPTURE 1 /* Can capture */ |
@@ -200,7 +199,6 @@ struct v4l2_capability | |||
200 | /* | 199 | /* |
201 | * V I D E O I M A G E F O R M A T | 200 | * V I D E O I M A G E F O R M A T |
202 | */ | 201 | */ |
203 | |||
204 | struct v4l2_pix_format | 202 | struct v4l2_pix_format |
205 | { | 203 | { |
206 | __u32 width; | 204 | __u32 width; |
@@ -213,7 +211,7 @@ struct v4l2_pix_format | |||
213 | __u32 priv; /* private data, depends on pixelformat */ | 211 | __u32 priv; /* private data, depends on pixelformat */ |
214 | }; | 212 | }; |
215 | 213 | ||
216 | /* Pixel format FOURCC depth Description */ | 214 | /* Pixel format FOURCC depth Description */ |
217 | #define V4L2_PIX_FMT_RGB332 v4l2_fourcc('R','G','B','1') /* 8 RGB-3-3-2 */ | 215 | #define V4L2_PIX_FMT_RGB332 v4l2_fourcc('R','G','B','1') /* 8 RGB-3-3-2 */ |
218 | #define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R','G','B','O') /* 16 RGB-5-5-5 */ | 216 | #define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R','G','B','O') /* 16 RGB-5-5-5 */ |
219 | #define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R','G','B','P') /* 16 RGB-5-6-5 */ | 217 | #define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R','G','B','P') /* 16 RGB-5-6-5 */ |
@@ -273,7 +271,6 @@ struct v4l2_fmtdesc | |||
273 | 271 | ||
274 | #define V4L2_FMT_FLAG_COMPRESSED 0x0001 | 272 | #define V4L2_FMT_FLAG_COMPRESSED 0x0001 |
275 | 273 | ||
276 | |||
277 | /* | 274 | /* |
278 | * T I M E C O D E | 275 | * T I M E C O D E |
279 | */ | 276 | */ |
@@ -303,7 +300,6 @@ struct v4l2_timecode | |||
303 | #define V4L2_TC_USERBITS_8BITCHARS 0x0008 | 300 | #define V4L2_TC_USERBITS_8BITCHARS 0x0008 |
304 | /* The above is based on SMPTE timecodes */ | 301 | /* The above is based on SMPTE timecodes */ |
305 | 302 | ||
306 | |||
307 | /* | 303 | /* |
308 | * M P E G C O M P R E S S I O N P A R A M E T E R S | 304 | * M P E G C O M P R E S S I O N P A R A M E T E R S |
309 | * | 305 | * |
@@ -311,8 +307,6 @@ struct v4l2_timecode | |||
311 | * ### there will be some incompatible changes. | 307 | * ### there will be some incompatible changes. |
312 | * | 308 | * |
313 | */ | 309 | */ |
314 | |||
315 | |||
316 | enum v4l2_bitrate_mode { | 310 | enum v4l2_bitrate_mode { |
317 | V4L2_BITRATE_NONE = 0, /* not specified */ | 311 | V4L2_BITRATE_NONE = 0, /* not specified */ |
318 | V4L2_BITRATE_CBR, /* constant bitrate */ | 312 | V4L2_BITRATE_CBR, /* constant bitrate */ |
@@ -421,7 +415,6 @@ struct v4l2_jpegcompression | |||
421 | * allways use APP0 */ | 415 | * allways use APP0 */ |
422 | }; | 416 | }; |
423 | 417 | ||
424 | |||
425 | /* | 418 | /* |
426 | * M E M O R Y - M A P P I N G B U F F E R S | 419 | * M E M O R Y - M A P P I N G B U F F E R S |
427 | */ | 420 | */ |
@@ -503,7 +496,6 @@ struct v4l2_window | |||
503 | void __user *bitmap; | 496 | void __user *bitmap; |
504 | }; | 497 | }; |
505 | 498 | ||
506 | |||
507 | /* | 499 | /* |
508 | * C A P T U R E P A R A M E T E R S | 500 | * C A P T U R E P A R A M E T E R S |
509 | */ | 501 | */ |
@@ -516,6 +508,7 @@ struct v4l2_captureparm | |||
516 | __u32 readbuffers; /* # of buffers for read */ | 508 | __u32 readbuffers; /* # of buffers for read */ |
517 | __u32 reserved[4]; | 509 | __u32 reserved[4]; |
518 | }; | 510 | }; |
511 | |||
519 | /* Flags for 'capability' and 'capturemode' fields */ | 512 | /* Flags for 'capability' and 'capturemode' fields */ |
520 | #define V4L2_MODE_HIGHQUALITY 0x0001 /* High quality imaging mode */ | 513 | #define V4L2_MODE_HIGHQUALITY 0x0001 /* High quality imaging mode */ |
521 | #define V4L2_CAP_TIMEPERFRAME 0x1000 /* timeperframe field is supported */ | 514 | #define V4L2_CAP_TIMEPERFRAME 0x1000 /* timeperframe field is supported */ |
@@ -533,7 +526,6 @@ struct v4l2_outputparm | |||
533 | /* | 526 | /* |
534 | * I N P U T I M A G E C R O P P I N G | 527 | * I N P U T I M A G E C R O P P I N G |
535 | */ | 528 | */ |
536 | |||
537 | struct v4l2_cropcap { | 529 | struct v4l2_cropcap { |
538 | enum v4l2_buf_type type; | 530 | enum v4l2_buf_type type; |
539 | struct v4l2_rect bounds; | 531 | struct v4l2_rect bounds; |
@@ -640,7 +632,6 @@ struct v4l2_standard | |||
640 | __u32 reserved[4]; | 632 | __u32 reserved[4]; |
641 | }; | 633 | }; |
642 | 634 | ||
643 | |||
644 | /* | 635 | /* |
645 | * V I D E O I N P U T S | 636 | * V I D E O I N P U T S |
646 | */ | 637 | */ |
@@ -655,6 +646,7 @@ struct v4l2_input | |||
655 | __u32 status; | 646 | __u32 status; |
656 | __u32 reserved[4]; | 647 | __u32 reserved[4]; |
657 | }; | 648 | }; |
649 | |||
658 | /* Values for the 'type' field */ | 650 | /* Values for the 'type' field */ |
659 | #define V4L2_INPUT_TYPE_TUNER 1 | 651 | #define V4L2_INPUT_TYPE_TUNER 1 |
660 | #define V4L2_INPUT_TYPE_CAMERA 2 | 652 | #define V4L2_INPUT_TYPE_CAMERA 2 |
@@ -834,6 +826,7 @@ struct v4l2_audio | |||
834 | __u32 mode; | 826 | __u32 mode; |
835 | __u32 reserved[2]; | 827 | __u32 reserved[2]; |
836 | }; | 828 | }; |
829 | |||
837 | /* Flags for the 'capability' field */ | 830 | /* Flags for the 'capability' field */ |
838 | #define V4L2_AUDCAP_STEREO 0x00001 | 831 | #define V4L2_AUDCAP_STEREO 0x00001 |
839 | #define V4L2_AUDCAP_AVL 0x00002 | 832 | #define V4L2_AUDCAP_AVL 0x00002 |
@@ -857,7 +850,6 @@ struct v4l2_audioout | |||
857 | */ | 850 | */ |
858 | 851 | ||
859 | /* Raw VBI */ | 852 | /* Raw VBI */ |
860 | |||
861 | struct v4l2_vbi_format | 853 | struct v4l2_vbi_format |
862 | { | 854 | { |
863 | __u32 sampling_rate; /* in 1 Hz */ | 855 | __u32 sampling_rate; /* in 1 Hz */ |
@@ -964,8 +956,6 @@ struct v4l2_streamparm | |||
964 | } parm; | 956 | } parm; |
965 | }; | 957 | }; |
966 | 958 | ||
967 | |||
968 | |||
969 | /* | 959 | /* |
970 | * I O C T L C O D E S F O R V I D E O D E V I C E S | 960 | * I O C T L C O D E S F O R V I D E O D E V I C E S |
971 | * | 961 | * |
diff --git a/include/media/ovcamchip.h b/include/media/ovcamchip.h index 8138983adced..0f43451f8bb3 100644 --- a/include/media/ovcamchip.h +++ b/include/media/ovcamchip.h | |||
@@ -15,6 +15,7 @@ | |||
15 | #define __LINUX_OVCAMCHIP_H | 15 | #define __LINUX_OVCAMCHIP_H |
16 | 16 | ||
17 | #include <linux/videodev.h> | 17 | #include <linux/videodev.h> |
18 | #include <media/v4l2-common.h> | ||
18 | #include <linux/i2c.h> | 19 | #include <linux/i2c.h> |
19 | 20 | ||
20 | /* --------------------------------- */ | 21 | /* --------------------------------- */ |
diff --git a/include/media/saa7146_vv.h b/include/media/saa7146_vv.h index 4507cb61ae93..83fe2e3d1e25 100644 --- a/include/media/saa7146_vv.h +++ b/include/media/saa7146_vv.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #define __SAA7146_VV__ | 2 | #define __SAA7146_VV__ |
3 | 3 | ||
4 | #include <linux/videodev.h> | 4 | #include <linux/videodev.h> |
5 | 5 | #include <media/v4l2-common.h> | |
6 | #include <media/saa7146.h> | 6 | #include <media/saa7146.h> |
7 | #include <media/video-buf.h> | 7 | #include <media/video-buf.h> |
8 | 8 | ||
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h index c2f54d2c9a4c..dec6b24e4c42 100644 --- a/include/media/v4l2-dev.h +++ b/include/media/v4l2-dev.h | |||
@@ -40,8 +40,6 @@ | |||
40 | #define VFL_TYPE_RADIO 2 | 40 | #define VFL_TYPE_RADIO 2 |
41 | #define VFL_TYPE_VTX 3 | 41 | #define VFL_TYPE_VTX 3 |
42 | 42 | ||
43 | const struct file_operations *fops; | ||
44 | |||
45 | /* Video standard functions */ | 43 | /* Video standard functions */ |
46 | extern unsigned int v4l2_video_std_fps(struct v4l2_standard *vs); | 44 | extern unsigned int v4l2_video_std_fps(struct v4l2_standard *vs); |
47 | extern int v4l2_video_std_construct(struct v4l2_standard *vs, | 45 | extern int v4l2_video_std_construct(struct v4l2_standard *vs, |
@@ -92,7 +90,7 @@ struct v4l2_tvnorm { | |||
92 | struct video_device | 90 | struct video_device |
93 | { | 91 | { |
94 | /* device ops */ | 92 | /* device ops */ |
95 | struct file_operations *fops; | 93 | const struct file_operations *fops; |
96 | 94 | ||
97 | /* device info */ | 95 | /* device info */ |
98 | struct device *dev; | 96 | struct device *dev; |
@@ -297,7 +295,7 @@ struct video_device | |||
297 | int (*vidioc_log_status) (struct file *file, void *fh); | 295 | int (*vidioc_log_status) (struct file *file, void *fh); |
298 | 296 | ||
299 | 297 | ||
300 | #if OBSOLETE_OWNER /* to be removed soon */ | 298 | #ifdef OBSOLETE_OWNER /* to be removed soon */ |
301 | /* obsolete -- fops->owner is used instead */ | 299 | /* obsolete -- fops->owner is used instead */ |
302 | struct module *owner; | 300 | struct module *owner; |
303 | /* dev->driver_data will be used instead some day. | 301 | /* dev->driver_data will be used instead some day. |
@@ -351,7 +349,7 @@ video_device_remove_file(struct video_device *vfd, | |||
351 | class_device_remove_file(&vfd->class_dev, attr); | 349 | class_device_remove_file(&vfd->class_dev, attr); |
352 | } | 350 | } |
353 | 351 | ||
354 | #if OBSOLETE_OWNER /* to be removed soon */ | 352 | #ifdef OBSOLETE_OWNER /* to be removed soon */ |
355 | /* helper functions to access driver private data. */ | 353 | /* helper functions to access driver private data. */ |
356 | static inline void *video_get_drvdata(struct video_device *dev) | 354 | static inline void *video_get_drvdata(struct video_device *dev) |
357 | { | 355 | { |