From: Wen-chien Jesse Sung Date: Wed, 29 Jun 2005 03:44:41 +0000 (-0700) Subject: [PATCH] fix semaphore handling in __unregister_chrdev_region X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=8d451687ca57371d303c5554b377d7f5c2ac6ae0;p=openwrt%2Fstaging%2Fblogic.git [PATCH] fix semaphore handling in __unregister_chrdev_region This up() should be down() instead. Signed-off-by: Wen-chien Jesse Sung Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/char_dev.c b/fs/char_dev.c index e82aac9cc2f5..a69a5d8a406f 100644 --- a/fs/char_dev.c +++ b/fs/char_dev.c @@ -150,7 +150,7 @@ __unregister_chrdev_region(unsigned major, unsigned baseminor, int minorct) struct char_device_struct *cd = NULL, **cp; int i = major_to_index(major); - up(&chrdevs_lock); + down(&chrdevs_lock); for (cp = &chrdevs[i]; *cp; cp = &(*cp)->next) if ((*cp)->major == major && (*cp)->baseminor == baseminor &&