]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blame - include/linux/cdev.h
Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq
[mirror_ubuntu-zesty-kernel.git] / include / linux / cdev.h
CommitLineData
1da177e4
LT
1#ifndef _LINUX_CDEV_H
2#define _LINUX_CDEV_H
3#ifdef __KERNEL__
4
5ec68b2e
JE
5#include <linux/kobject.h>
6#include <linux/kdev_t.h>
7#include <linux/list.h>
8
3d8b3036
JE
9struct file_operations;
10struct inode;
11struct module;
12
1da177e4
LT
13struct cdev {
14 struct kobject kobj;
15 struct module *owner;
99ac48f5 16 const struct file_operations *ops;
1da177e4
LT
17 struct list_head list;
18 dev_t dev;
19 unsigned int count;
20};
21
99ac48f5 22void cdev_init(struct cdev *, const struct file_operations *);
1da177e4
LT
23
24struct cdev *cdev_alloc(void);
25
26void cdev_put(struct cdev *p);
27
28int cdev_add(struct cdev *, dev_t, unsigned);
29
30void cdev_del(struct cdev *);
31
32void cd_forget(struct inode *);
33
5da6185b
DH
34extern struct backing_dev_info directly_mappable_cdev_bdi;
35
1da177e4
LT
36#endif
37#endif