[PATCH] fix semaphore handling in __unregister_chrdev_region
authorWen-chien Jesse Sung <jesse@cola.voip.idv.tw>
Wed, 29 Jun 2005 03:44:41 +0000 (20:44 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 29 Jun 2005 04:20:29 +0000 (21:20 -0700)
This up() should be down() instead.

Signed-off-by: Wen-chien Jesse Sung <jesse@cola.voip.idv.tw>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/char_dev.c

index e82aac9cc2f5b9d39101e372cdab81dd971725a0..a69a5d8a406f982be7eb6cb1fc9c4ff59a858ffa 100644 (file)
@@ -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 &&