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
10 #define CMMB_MAJOR 200
\r
13 #define CMMB_DEVICE_TUNER 0
\r
14 #define CMMB_DEVICE_DEMO 1
\r
15 #define CMMB_DEVICE_DEMUX 2
\r
16 #define CMMB_DEVICE_CA 3
\r
17 #define CMMB_DEVICE_MEMO 4
\r
19 extern struct class * cmmb_class;
\r
21 struct cmmb_adapter {
\r
23 struct list_head list_head;
\r
24 struct list_head device_list;
\r
27 struct device *device;
\r
31 extern struct cmmb_adapter CMMB_adapter;
\r
32 struct cmmb_device {
\r
33 struct list_head list_head;
\r
34 struct file_operations *fops;
\r
35 struct cmmb_adapter *adapter;
\r
39 wait_queue_head_t wait_queue;
\r
41 int (*kernel_ioctl)(struct inode *inode, struct file *file,
\r
42 unsigned int cmd, void *arg);
\r
48 int cmmb_register_device(struct cmmb_adapter *adap, struct cmmb_device **pcmmbdev,
\r
49 struct file_operations *fops, void *priv, int type,char* name);
\r
50 void cmmb_unregister_device(struct cmmb_device *cmmbdev);
\r
52 #define cmmb_attach(FUNCTION, ARGS...) ({ \
\r
56 #endif/* #ifndef _CMMB_CLASS_H_ */
\r