aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/videodev.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-06-04 09:06:18 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-06-25 01:05:04 -0400
commit401998fa96fe18b057af3f906527196522dd2d9d (patch)
tree32d656e18410ab05204c83b57969db23665e4fe9 /include/linux/videodev.h
parent7565ab082de88ec274283d6b83980144e520a2fc (diff)
V4L/DVB (4065): Several improvements at videodev.c
Videodev now is capable of better handling V4L2 api, by processing V4L2 ioctls and using callbacks to the driver. The drivers should be migrated to the newer way and the older one will be obsoleted soon. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'include/linux/videodev.h')
-rw-r--r--include/linux/videodev.h58
1 files changed, 21 insertions, 37 deletions
diff --git a/include/linux/videodev.h b/include/linux/videodev.h
index 91140091ced2..5b6205544a7a 100644
--- a/include/linux/videodev.h
+++ b/include/linux/videodev.h
@@ -1,49 +1,28 @@
1/*
2 * Video for Linux version 1 - OBSOLETE
3 *
4 * Header file for v4l1 drivers and applications, for
5 * Linux kernels 2.2.x or 2.4.x.
6 *
7 * Provides header for legacy drivers and applications
8 *
9 * See http://linuxtv.org for more info
10 *
11 */
1#ifndef __LINUX_VIDEODEV_H 12#ifndef __LINUX_VIDEODEV_H
2#define __LINUX_VIDEODEV_H 13#define __LINUX_VIDEODEV_H
3 14
4#include <linux/types.h> 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 */
5 21
6#define HAVE_V4L1 1 22#define HAVE_V4L1 1
7 23
8#include <linux/videodev2.h> 24#include <linux/videodev2.h>
9 25
10#ifdef __KERNEL__
11
12#include <linux/mm.h>
13
14extern struct video_device* video_devdata(struct file*);
15
16#define to_video_device(cd) container_of(cd, struct video_device, class_dev)
17static inline void
18video_device_create_file(struct video_device *vfd,
19 struct class_device_attribute *attr)
20{
21 class_device_create_file(&vfd->class_dev, attr);
22}
23static inline void
24video_device_remove_file(struct video_device *vfd,
25 struct class_device_attribute *attr)
26{
27 class_device_remove_file(&vfd->class_dev, attr);
28}
29
30#if OBSOLETE_OWNER /* to be removed in 2.6.15 */
31/* helper functions to access driver private data. */
32static inline void *video_get_drvdata(struct video_device *dev)
33{
34 return dev->priv;
35}
36
37static inline void video_set_drvdata(struct video_device *dev, void *data)
38{
39 dev->priv = data;
40}
41#endif
42
43extern int video_exclusive_open(struct inode *inode, struct file *file);
44extern int video_exclusive_release(struct inode *inode, struct file *file);
45#endif /* __KERNEL__ */
46
47struct video_capability 26struct video_capability
48{ 27{
49 char name[32]; 28 char name[32];
@@ -363,6 +342,11 @@ struct video_code
363#define VID_HARDWARE_SAA7114H 37 342#define VID_HARDWARE_SAA7114H 37
364#define VID_HARDWARE_SN9C102 38 343#define VID_HARDWARE_SN9C102 38
365#define VID_HARDWARE_ARV 39 344#define VID_HARDWARE_ARV 39
345
346#ifdef __KERNEL__
347#include <media/v4l2-dev.h>
348#endif /* __KERNEL__ */
349
366#endif /* __LINUX_VIDEODEV_H */ 350#endif /* __LINUX_VIDEODEV_H */
367 351
368/* 352/*