From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from nm1-vm0.bt.bullet.mail.ird.yahoo.com ([212.82.108.94]:30475 "HELO nm1-vm0.bt.bullet.mail.ird.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752456Ab1HTLbK (ORCPT ); Sat, 20 Aug 2011 07:31:10 -0400 Message-ID: <4E4F9AF9.4060604@yahoo.com> Date: Sat, 20 Aug 2011 12:31:05 +0100 From: Chris Rankin MIME-Version: 1.0 To: Mauro Carvalho Chehab CC: Devin Heitmueller , linux-media@vger.kernel.org, Antti Palosaari Subject: [PATCH 5/6] EM28xx - move printk lines outside mutex lock References: <4E4D5157.2080406@yahoo.com> <4E4D8DFD.5060800@yahoo.com> <4E4DFA65.4090508@redhat.com> In-Reply-To: <4E4DFA65.4090508@redhat.com> Content-Type: multipart/mixed; boundary="------------090107040809030108070102" Sender: linux-media-owner@vger.kernel.org List-ID: This is a multi-part message in MIME format. --------------090107040809030108070102 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit There's no reason to still be holding the device list mutex for either of these printk statements. Signed-off-by: Chris Rankin --------------090107040809030108070102 Content-Type: text/x-patch; name="EM28xx-unlocked-printk.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="EM28xx-unlocked-printk.diff" --- linux-3.0/drivers/media/video/em28xx/em28xx-core.c.orig 2011-08-18 23:05:50.000000000 +0100 +++ linux-3.0/drivers/media/video/em28xx/em28xx-core.c 2011-08-18 23:07:02.000000000 +0100 @@ -1186,8 +1186,8 @@ 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); @@ -1200,9 +1200,9 @@ 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); --------------090107040809030108070102--