[media] em28xx: move printk lines outside mutex lock
authorChris Rankin <rankincj@yahoo.com>
Sat, 20 Aug 2011 11:31:05 +0000 (08:31 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 3 Sep 2011 23:50:11 +0000 (20:50 -0300)
There's no reason to still be holding the device list mutex for either of these
printk statements.

Signed-off-by: Chris Rankin <rankincj@yahoo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/em28xx/em28xx-core.c

index ebff91709b5723f8353f2a2b3598001633404973..bd481ab65f29facf610660db14692b9ff3a0bedf 100644 (file)
@@ -1210,8 +1210,8 @@ int em28xx_register_extension(struct em28xx_ops *ops)
        list_for_each_entry(dev, &em28xx_devlist, devlist) {
                ops->init(dev);
        }
-       printk(KERN_INFO "Em28xx: Initialized (%s) extension\n", ops->name);
        mutex_unlock(&em28xx_devlist_mutex);
+       printk(KERN_INFO "Em28xx: Initialized (%s) extension\n", ops->name);
        return 0;
 }
 EXPORT_SYMBOL(em28xx_register_extension);
@@ -1224,9 +1224,9 @@ void em28xx_unregister_extension(struct em28xx_ops *ops)
        list_for_each_entry(dev, &em28xx_devlist, devlist) {
                ops->fini(dev);
        }
-       printk(KERN_INFO "Em28xx: Removed (%s) extension\n", ops->name);
        list_del(&ops->next);
        mutex_unlock(&em28xx_devlist_mutex);
+       printk(KERN_INFO "Em28xx: Removed (%s) extension\n", ops->name);
 }
 EXPORT_SYMBOL(em28xx_unregister_extension);