1 /* SPDX-License-Identifier: GPL-2.0 */
5 #include <linux/kobject.h>
6 #include <linux/kdev_t.h>
7 #include <linux/list.h>
8 #include <linux/device.h>
10 struct file_operations
;
17 const struct file_operations
*ops
;
18 struct list_head list
;
23 void cdev_init(struct cdev
*, const struct file_operations
*);
25 struct cdev
*cdev_alloc(void);
27 void cdev_put(struct cdev
*p
);
29 int cdev_add(struct cdev
*, dev_t
, unsigned);
31 void cdev_set_parent(struct cdev
*p
, struct kobject
*kobj
);
32 int cdev_device_add(struct cdev
*cdev
, struct device
*dev
);
33 void cdev_device_del(struct cdev
*cdev
, struct device
*dev
);
35 void cdev_del(struct cdev
*);
37 void cd_forget(struct inode
*);