diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-09-10 17:33:04 +0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-09-10 17:33:04 +0400 |
commit | 3827119e207823ff0f3e85271bef7a0dc953ee38 (patch) | |
tree | 66d2a24524628b3123b39e1364281886d2f9074f /include/linux/fs.h | |
parent | 9d416811f8cab11bf595b2880c557c33e3ae1ae9 (diff) | |
parent | 93fe4483e6fd3e71d17cd919de14b3b1f9eb3795 (diff) | |
download | linux-3827119e207823ff0f3e85271bef7a0dc953ee38.tar.xz |
Merge branch 'topic/soundcore-preclaim' into for-linus
* topic/soundcore-preclaim:
sound: make OSS device number claiming optional and schedule its removal
sound: request char-major-* module aliases for missing OSS devices
chrdev: implement __[un]register_chrdev()
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 73e9b643e455..3972ffb597c5 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1998,12 +1998,25 @@ extern void bd_release_from_disk(struct block_device *, struct gendisk *); #define CHRDEV_MAJOR_HASH_SIZE 255 extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, const char *); extern int register_chrdev_region(dev_t, unsigned, const char *); -extern int register_chrdev(unsigned int, const char *, - const struct file_operations *); -extern void unregister_chrdev(unsigned int, const char *); +extern int __register_chrdev(unsigned int major, unsigned int baseminor, + unsigned int count, const char *name, + const struct file_operations *fops); +extern void __unregister_chrdev(unsigned int major, unsigned int baseminor, + unsigned int count, const char *name); extern void unregister_chrdev_region(dev_t, unsigned); extern void chrdev_show(struct seq_file *,off_t); +static inline int register_chrdev(unsigned int major, const char *name, + const struct file_operations *fops) +{ + return __register_chrdev(major, 0, 256, name, fops); +} + +static inline void unregister_chrdev(unsigned int major, const char *name) +{ + __unregister_chrdev(major, 0, 256, name); +} + /* fs/block_dev.c */ #define BDEVNAME_SIZE 32 /* Largest string for a blockdev identifier */ #define BDEVT_SIZE 10 /* Largest string for MAJ:MIN for blkdev */ |