1 #ifndef _CMMB_CLASS_H_
\r
2 #define _CMMB_CLASS_H_
\r
5 #include <linux/types.h>
\r
6 #include <linux/poll.h>
\r
7 #include <linux/fs.h>
\r
8 #include <linux/list.h>
\r
9 #include <linux/smp_lock.h>
\r
11 #define CMMB_MAJOR 200
\r
14 #define CMMB_DEVICE_TUNER 0
\r
15 #define CMMB_DEVICE_DEMO 1
\r
16 #define CMMB_DEVICE_DEMUX 2
\r
17 #define CMMB_DEVICE_CA 3
\r
18 #define CMMB_DEVICE_MEMO 4
\r
20 extern struct class * cmmb_class;
\r
22 struct cmmb_adapter {
\r
24 struct list_head list_head;
\r
25 struct list_head device_list;
\r
28 struct device *device;
\r
32 extern struct cmmb_adapter CMMB_adapter;
\r
33 struct cmmb_device {
\r
34 struct list_head list_head;
\r
35 struct file_operations *fops;
\r
36 struct cmmb_adapter *adapter;
\r
40 wait_queue_head_t wait_queue;
\r
42 int (*kernel_ioctl)(struct inode *inode, struct file *file,
\r
43 unsigned int cmd, void *arg);
\r
49 int cmmb_register_device(struct cmmb_adapter *adap, struct cmmb_device **pcmmbdev,
\r
50 struct file_operations *fops, void *priv, int type,char* name);
\r
51 void cmmb_unregister_device(struct cmmb_device *cmmbdev);
\r
53 #define cmmb_attach(FUNCTION, ARGS...) ({ \
\r
57 #endif/* #ifndef _CMMB_CLASS_H_ */