1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23#ifndef _DVBDEV_H_
24#define _DVBDEV_H_
25
26#include <linux/types.h>
27#include <linux/poll.h>
28#include <linux/fs.h>
29#include <linux/list.h>
30#include <linux/smp_lock.h>
31
32#define DVB_MAJOR 212
33
34#define DVB_DEVICE_VIDEO 0
35#define DVB_DEVICE_AUDIO 1
36#define DVB_DEVICE_SEC 2
37#define DVB_DEVICE_FRONTEND 3
38#define DVB_DEVICE_DEMUX 4
39#define DVB_DEVICE_DVR 5
40#define DVB_DEVICE_CA 6
41#define DVB_DEVICE_NET 7
42#define DVB_DEVICE_OSD 8
43
44
45struct dvb_adapter {
46 int num;
47 struct list_head list_head;
48 struct list_head device_list;
49 const char *name;
50 u8 proposed_mac [6];
51 void* priv;
52
53 struct device *device;
54
55 struct module *module;
56};
57
58
59struct dvb_device {
60 struct list_head list_head;
61 struct file_operations *fops;
62 struct dvb_adapter *adapter;
63 int type;
64 u32 id;
65
66
67
68 int readers;
69 int writers;
70 int users;
71
72
73 int (*kernel_ioctl)(struct inode *inode, struct file *file,
74 unsigned int cmd, void *arg);
75
76 void *priv;
77};
78
79
80extern int dvb_register_adapter (struct dvb_adapter *adap, const char *name, struct module *module, struct device *device);
81extern int dvb_unregister_adapter (struct dvb_adapter *adap);
82
83extern int dvb_register_device (struct dvb_adapter *adap,
84 struct dvb_device **pdvbdev,
85 const struct dvb_device *template,
86 void *priv,
87 int type);
88
89extern void dvb_unregister_device (struct dvb_device *dvbdev);
90
91extern int dvb_generic_open (struct inode *inode, struct file *file);
92extern int dvb_generic_release (struct inode *inode, struct file *file);
93extern int dvb_generic_ioctl (struct inode *inode, struct file *file,
94 unsigned int cmd, unsigned long arg);
95
96
97
98
99
100extern int dvb_usercopy(struct inode *inode, struct file *file,
101 unsigned int cmd, unsigned long arg,
102 int (*func)(struct inode *inode, struct file *file,
103 unsigned int cmd, void *arg));
104
105#endif
106