aboutsummaryrefslogtreecommitdiffstats
path: root/fs/char_dev.c
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2007-07-19 04:47:51 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-19 13:04:43 -0400
commite53252d97e670a38b1d2e9723b48077bba11ddda (patch)
treea9909f22d7f0424214e2576912c0a3300dde3df0 /fs/char_dev.c
parent68fc4fabca897a09f75f53bac14cdc7a98f52210 (diff)
unregister_chrdev() return void
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>
Diffstat (limited to 'fs/char_dev.c')
-rw-r--r--fs/char_dev.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/char_dev.c b/fs/char_dev.c
index 164a45cdaf5f..bbbf07baa145 100644
--- a/fs/char_dev.c
+++ b/fs/char_dev.c
@@ -321,14 +321,13 @@ void unregister_chrdev_region(dev_t from, unsigned count)
321 } 321 }
322} 322}
323 323
324int unregister_chrdev(unsigned int major, const char *name) 324void unregister_chrdev(unsigned int major, const char *name)
325{ 325{
326 struct char_device_struct *cd; 326 struct char_device_struct *cd;
327 cd = __unregister_chrdev_region(major, 0, 256); 327 cd = __unregister_chrdev_region(major, 0, 256);
328 if (cd && cd->cdev) 328 if (cd && cd->cdev)
329 cdev_del(cd->cdev); 329 cdev_del(cd->cdev);
330 kfree(cd); 330 kfree(cd);
331 return 0;
332} 331}
333 332
334static DEFINE_SPINLOCK(cdev_lock); 333static DEFINE_SPINLOCK(cdev_lock);