Commit e53252d9 authored by Akinobu Mita's avatar Akinobu Mita Committed by Linus Torvalds

unregister_chrdev() return void

unregister_chrdev() does not return meaningful value.  This patch makes it
return void like most unregister_* functions.
Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 68fc4fab
...@@ -321,14 +321,13 @@ void unregister_chrdev_region(dev_t from, unsigned count) ...@@ -321,14 +321,13 @@ void unregister_chrdev_region(dev_t from, unsigned count)
} }
} }
int unregister_chrdev(unsigned int major, const char *name) void unregister_chrdev(unsigned int major, const char *name)
{ {
struct char_device_struct *cd; struct char_device_struct *cd;
cd = __unregister_chrdev_region(major, 0, 256); cd = __unregister_chrdev_region(major, 0, 256);
if (cd && cd->cdev) if (cd && cd->cdev)
cdev_del(cd->cdev); cdev_del(cd->cdev);
kfree(cd); kfree(cd);
return 0;
} }
static DEFINE_SPINLOCK(cdev_lock); static DEFINE_SPINLOCK(cdev_lock);
......
...@@ -1463,7 +1463,7 @@ extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, const char *); ...@@ -1463,7 +1463,7 @@ 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_region(dev_t, unsigned, const char *);
extern int register_chrdev(unsigned int, const char *, extern int register_chrdev(unsigned int, const char *,
const struct file_operations *); const struct file_operations *);
extern int unregister_chrdev(unsigned int, const char *); extern void unregister_chrdev(unsigned int, const char *);
extern void unregister_chrdev_region(dev_t, unsigned); extern void unregister_chrdev_region(dev_t, unsigned);
extern int chrdev_open(struct inode *, struct file *); extern int chrdev_open(struct inode *, struct file *);
extern void chrdev_show(struct seq_file *,off_t); extern void chrdev_show(struct seq_file *,off_t);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment