aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/char_dev.c3
-rw-r--r--include/linux/fs.h2
2 files changed, 2 insertions, 3 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);
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 9562a59b3703..75dd16efc9b6 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1463,7 +1463,7 @@ extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, const char *);
1463extern int register_chrdev_region(dev_t, unsigned, const char *); 1463extern int register_chrdev_region(dev_t, unsigned, const char *);
1464extern int register_chrdev(unsigned int, const char *, 1464extern int register_chrdev(unsigned int, const char *,
1465 const struct file_operations *); 1465 const struct file_operations *);
1466extern int unregister_chrdev(unsigned int, const char *); 1466extern void unregister_chrdev(unsigned int, const char *);
1467extern void unregister_chrdev_region(dev_t, unsigned); 1467extern void unregister_chrdev_region(dev_t, unsigned);
1468extern int chrdev_open(struct inode *, struct file *); 1468extern int chrdev_open(struct inode *, struct file *);
1469extern void chrdev_show(struct seq_file *,off_t); 1469extern void chrdev_show(struct seq_file *,off_t);