misc.c (3d5271f9883cba7b54762bc4fe027d4172f06db7) misc.c (99ac48f54a91d02140c497edc31dc57d4bc5c85d)
1/*
2 * linux/drivers/char/misc.c
3 *
4 * Generic misc open routine by Johan Myreen
5 *
6 * Based on code from Linus
7 *
8 * Teemu Rantanen's Microsoft Busmouse support and Derrick Cole's

--- 115 unchanged lines hidden (view full) ---

124};
125#endif
126
127static int misc_open(struct inode * inode, struct file * file)
128{
129 int minor = iminor(inode);
130 struct miscdevice *c;
131 int err = -ENODEV;
1/*
2 * linux/drivers/char/misc.c
3 *
4 * Generic misc open routine by Johan Myreen
5 *
6 * Based on code from Linus
7 *
8 * Teemu Rantanen's Microsoft Busmouse support and Derrick Cole's

--- 115 unchanged lines hidden (view full) ---

124};
125#endif
126
127static int misc_open(struct inode * inode, struct file * file)
128{
129 int minor = iminor(inode);
130 struct miscdevice *c;
131 int err = -ENODEV;
132 struct file_operations *old_fops, *new_fops = NULL;
132 const struct file_operations *old_fops, *new_fops = NULL;
133
134 down(&misc_sem);
135
136 list_for_each_entry(c, &misc_list, list) {
137 if (c->minor == minor) {
138 new_fops = fops_get(c->fops);
139 break;
140 }

--- 173 unchanged lines hidden ---
133
134 down(&misc_sem);
135
136 list_for_each_entry(c, &misc_list, list) {
137 if (c->minor == minor) {
138 new_fops = fops_get(c->fops);
139 break;
140 }

--- 173 unchanged lines hidden ---