cdev.h 460 B

123456789101112131415161718192021222324252627
  1. #ifndef _LINUX_CDEV_H
  2. #define _LINUX_CDEV_H
  3. #ifdef __KERNEL__
  4. struct cdev {
  5. struct kobject kobj;
  6. struct module *owner;
  7. struct file_operations *ops;
  8. struct list_head list;
  9. dev_t dev;
  10. unsigned int count;
  11. };
  12. void cdev_init(struct cdev *, struct file_operations *);
  13. struct cdev *cdev_alloc(void);
  14. void cdev_put(struct cdev *p);
  15. int cdev_add(struct cdev *, dev_t, unsigned);
  16. void cdev_del(struct cdev *);
  17. void cd_forget(struct inode *);
  18. #endif
  19. #endif