unregister_chrdev() return void
authorAkinobu Mita <akinobu.mita@gmail.com>
Thu, 19 Jul 2007 08:47:51 +0000 (01:47 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 19 Jul 2007 17:04:43 +0000 (10:04 -0700)
unregister_chrdev() does not return meaningful value.  This patch makes it
return void like most unregister_* functions.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/char_dev.c
include/linux/fs.h

index 164a45cdaf5f96cd8e6ac92b617c0525f0aaf8ff..bbbf07baa1454a9fd80eb2ea37c30fdc98911bd0 100644 (file)
@@ -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;
        cd = __unregister_chrdev_region(major, 0, 256);
        if (cd && cd->cdev)
                cdev_del(cd->cdev);
        kfree(cd);
-       return 0;
 }
 
 static DEFINE_SPINLOCK(cdev_lock);
index 9562a59b3703132302a01d8bd6e481345c001f21..75dd16efc9b6989bbcf64f77495c78aa4aeb8b58 100644 (file)
@@ -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(unsigned int, const char *,
                           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 int chrdev_open(struct inode *, struct file *);
 extern void chrdev_show(struct seq_file *,off_t);