mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-27 05:20:58 +07:00
99ac48f54a
Mark the f_ops members of inodes as const, as well as fix the ripple-through this causes by places that copy this f_ops and then "do stuff" with it. Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
28 lines
472 B
C
28 lines
472 B
C
#ifndef _LINUX_CDEV_H
|
|
#define _LINUX_CDEV_H
|
|
#ifdef __KERNEL__
|
|
|
|
struct cdev {
|
|
struct kobject kobj;
|
|
struct module *owner;
|
|
const struct file_operations *ops;
|
|
struct list_head list;
|
|
dev_t dev;
|
|
unsigned int count;
|
|
};
|
|
|
|
void cdev_init(struct cdev *, const struct file_operations *);
|
|
|
|
struct cdev *cdev_alloc(void);
|
|
|
|
void cdev_put(struct cdev *p);
|
|
|
|
int cdev_add(struct cdev *, dev_t, unsigned);
|
|
|
|
void cdev_del(struct cdev *);
|
|
|
|
void cd_forget(struct inode *);
|
|
|
|
#endif
|
|
#endif
|