Lines Matching refs:DRM

39 } *DRM(stub_list);
41 static struct proc_dir_entry *DRM(stub_root);
47 } DRM(stub_info);
49 static int DRM(stub_open)(struct inode *inode, struct file *filp) in DRM() function
56 if (!DRM(stub_list) || !DRM(stub_list)[minor].fops) return -ENODEV; in DRM()
58 filp->f_op = fops_get(DRM(stub_list)[minor].fops); in DRM()
68 static struct file_operations DRM(stub_fops) = {
70 .open = DRM(stub_open)
73 static int DRM(stub_getminor)(const char *name, struct file_operations *fops, in DRM() function
78 if (!DRM(stub_list)) { in DRM()
79 DRM(stub_list) = DRM(alloc)(sizeof(*DRM(stub_list)) in DRM()
81 if(!DRM(stub_list)) return -1; in DRM()
83 DRM(stub_list)[i].name = NULL; in DRM()
84 DRM(stub_list)[i].fops = NULL; in DRM()
88 if (!DRM(stub_list)[i].fops) { in DRM()
89 DRM(stub_list)[i].name = name; in DRM()
90 DRM(stub_list)[i].fops = fops; in DRM()
91 DRM(stub_root) = DRM(proc_init)(dev, i, DRM(stub_root), in DRM()
92 &DRM(stub_list)[i] in DRM()
100 static int DRM(stub_putminor)(int minor) in DRM() function
103 DRM(stub_list)[minor].name = NULL; in DRM()
104 DRM(stub_list)[minor].fops = NULL; in DRM()
105 DRM(proc_cleanup)(minor, DRM(stub_root), in DRM()
106 DRM(stub_list)[minor].dev_root); in DRM()
111 DRM(free)(DRM(stub_list), in DRM()
112 sizeof(*DRM(stub_list)) * DRM_STUB_MAXCARDS, in DRM()
120 int DRM(stub_register)(const char *name, struct file_operations *fops, in DRM() function
126 if (register_chrdev(DRM_MAJOR, "drm", &DRM(stub_fops))) in DRM()
131 DRM(stub_info).info_register = i->info_register; in DRM()
132 DRM(stub_info).info_unregister = i->info_unregister; in DRM()
134 } else if (DRM(stub_info).info_register != DRM(stub_getminor)) { in DRM()
135 DRM(stub_info).info_register = DRM(stub_getminor); in DRM()
136 DRM(stub_info).info_unregister = DRM(stub_putminor); in DRM()
138 inter_module_register("drm", THIS_MODULE, &DRM(stub_info)); in DRM()
140 if (DRM(stub_info).info_register) in DRM()
141 return DRM(stub_info).info_register(name, fops, dev); in DRM()
145 int DRM(stub_unregister)(int minor) in DRM() function
148 if (DRM(stub_info).info_unregister) in DRM()
149 return DRM(stub_info).info_unregister(minor); in DRM()