aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/videodev.h12
-rw-r--r--include/linux/videodev2.h18
2 files changed, 28 insertions, 2 deletions
diff --git a/include/linux/videodev.h b/include/linux/videodev.h
index 392592a040c5..91140091ced2 100644
--- a/include/linux/videodev.h
+++ b/include/linux/videodev.h
@@ -27,6 +27,18 @@ video_device_remove_file(struct video_device *vfd,
27 class_device_remove_file(&vfd->class_dev, attr); 27 class_device_remove_file(&vfd->class_dev, attr);
28} 28}
29 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
30 42
31extern int video_exclusive_open(struct inode *inode, struct file *file); 43extern int video_exclusive_open(struct inode *inode, struct file *file);
32extern int video_exclusive_release(struct inode *inode, struct file *file); 44extern int video_exclusive_release(struct inode *inode, struct file *file);
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index 65829a510aca..cbe15edbe668 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -15,12 +15,13 @@
15 */ 15 */
16#ifdef __KERNEL__ 16#ifdef __KERNEL__
17#include <linux/time.h> /* need struct timeval */ 17#include <linux/time.h> /* need struct timeval */
18#include <linux/poll.h>
19#include <linux/device.h>
18#endif 20#endif
19#include <linux/compiler.h> /* need __user */ 21#include <linux/compiler.h> /* need __user */
20 22
21#include <linux/poll.h>
22#include <linux/device.h>
23 23
24#define OBSOLETE_OWNER 1 /* It will be removed for 2.6.15 */
24#define HAVE_V4L2 1 25#define HAVE_V4L2 1
25 26
26/* 27/*
@@ -30,6 +31,8 @@
30 31
31#define VIDEO_MAX_FRAME 32 32#define VIDEO_MAX_FRAME 32
32 33
34#ifdef __KERNEL__
35
33#define VFL_TYPE_GRABBER 0 36#define VFL_TYPE_GRABBER 0
34#define VFL_TYPE_VBI 1 37#define VFL_TYPE_VBI 1
35#define VFL_TYPE_RADIO 2 38#define VFL_TYPE_RADIO 2
@@ -50,6 +53,15 @@ struct video_device
50 void (*release)(struct video_device *vfd); 53 void (*release)(struct video_device *vfd);
51 54
52 55
56#if OBSOLETE_OWNER /* to be removed in 2.6.15 */
57 /* obsolete -- fops->owner is used instead */
58 struct module *owner;
59 /* dev->driver_data will be used instead some day.
60 * Use the video_{get|set}_drvdata() helper functions,
61 * so the switch over will be transparent for you.
62 * Or use {pci|usb}_{get|set}_drvdata() directly. */
63 void *priv;
64#endif
53 65
54 /* for videodev.c intenal usage -- please don't touch */ 66 /* for videodev.c intenal usage -- please don't touch */
55 int users; /* video_exclusive_{open|close} ... */ 67 int users; /* video_exclusive_{open|close} ... */
@@ -87,6 +99,8 @@ extern int video_usercopy(struct inode *inode, struct file *file,
87struct video_device *video_device_alloc(void); 99struct video_device *video_device_alloc(void);
88void video_device_release(struct video_device *vfd); 100void video_device_release(struct video_device *vfd);
89 101
102#endif
103
90/* 104/*
91 * M I S C E L L A N E O U S 105 * M I S C E L L A N E O U S
92 */ 106 */