]> bbs.cooldavid.org Git - net-next-2.6.git/blame - include/linux/cdev.h
ipv6: AF_INET6 link address family
[net-next-2.6.git] / include / linux / cdev.h
CommitLineData
1da177e4
LT
1#ifndef _LINUX_CDEV_H
2#define _LINUX_CDEV_H
1da177e4 3
5ec68b2e
JE
4#include <linux/kobject.h>
5#include <linux/kdev_t.h>
6#include <linux/list.h>
7
3d8b3036
JE
8struct file_operations;
9struct inode;
10struct module;
11
1da177e4
LT
12struct cdev {
13 struct kobject kobj;
14 struct module *owner;
99ac48f5 15 const struct file_operations *ops;
1da177e4
LT
16 struct list_head list;
17 dev_t dev;
18 unsigned int count;
19};
20
99ac48f5 21void cdev_init(struct cdev *, const struct file_operations *);
1da177e4
LT
22
23struct cdev *cdev_alloc(void);
24
25void cdev_put(struct cdev *p);
26
27int cdev_add(struct cdev *, dev_t, unsigned);
28
29void cdev_del(struct cdev *);
30
9fd5746f
TT
31int cdev_index(struct inode *inode);
32
1da177e4
LT
33void cd_forget(struct inode *);
34
5da6185b
DH
35extern struct backing_dev_info directly_mappable_cdev_bdi;
36
1da177e4 37#endif