--- /dev/null
+#ifndef _CMMB_CLASS_H_\r
+#define _CMMB_CLASS_H_\r
+\r
+\r
+#include <linux/types.h>\r
+#include <linux/poll.h>\r
+#include <linux/fs.h>\r
+#include <linux/list.h>\r
+#include <linux/smp_lock.h>\r
+\r
+#define CMMB_MAJOR 200\r
+\r
+\r
+#define CMMB_DEVICE_TUNER 0\r
+#define CMMB_DEVICE_DEMO 1\r
+#define CMMB_DEVICE_DEMUX 2\r
+#define CMMB_DEVICE_CA 3\r
+#define CMMB_DEVICE_MEMO 4\r
+\r
+extern struct class * cmmb_class;\r
+\r
+struct cmmb_adapter {\r
+ int num;\r
+ struct list_head list_head;\r
+ struct list_head device_list;\r
+ const char *name;\r
+ void* priv;\r
+ struct device *device;\r
+};\r
+\r
+\r
+extern struct cmmb_adapter CMMB_adapter;\r
+struct cmmb_device {\r
+ struct list_head list_head;\r
+ struct file_operations *fops;\r
+ struct cmmb_adapter *adapter;\r
+ int type;\r
+ u32 id;\r
+\r
+ wait_queue_head_t wait_queue;\r
+\r
+ int (*kernel_ioctl)(struct inode *inode, struct file *file,\r
+ unsigned int cmd, void *arg);\r
+\r
+ void *priv;\r
+};\r
+\r
+\r
+int cmmb_register_device(struct cmmb_adapter *adap, struct cmmb_device **pcmmbdev,\r
+ struct file_operations *fops, void *priv, int type,char* name);\r
+void cmmb_unregister_device(struct cmmb_device *cmmbdev);\r
+\r
+#define cmmb_attach(FUNCTION, ARGS...) ({ \\r
+ FUNCTION(ARGS); \\r
+\r
+\r
+#endif/* #ifndef _CMMB_CLASS_H_ */
\ No newline at end of file