public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sony_pi: Remove the BKL from sonypi_misc_open
@ 2009-10-18 21:54 John Kacur
  2009-10-19  4:19 ` Arnd Bergmann
  0 siblings, 1 reply; 19+ messages in thread
From: John Kacur @ 2009-10-18 21:54 UTC (permalink / raw)
  To: linux-kernel, Thomas Gleixner
  Cc: Arnd Bergmann, Alan Cox, Ingo Molnar, Frederic Weisbecker

>From b5fefbe4ab8783a0299953b0869cf2af24160875 Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
Date: Sun, 18 Oct 2009 23:49:49 +0200
Subject: [PATCH] sony_pi: Remove the BKL from sonypi_misc_open

The BKL is in this function because of the BKL pushdown
(see commit f8f2c79d594463427f7114cedb1555110d547d89)

It is not needed here because the mutex_lock sonypi_device.lock
provides the necessary locking.

Signed-off-by: John Kacur <jkacur@redhat.com>
---
 drivers/char/sonypi.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c
index 8c262aa..f64600b 100644
--- a/drivers/char/sonypi.c
+++ b/drivers/char/sonypi.c
@@ -50,7 +50,6 @@
 #include <linux/err.h>
 #include <linux/kfifo.h>
 #include <linux/platform_device.h>
-#include <linux/smp_lock.h>
 
 #include <asm/uaccess.h>
 #include <asm/io.h>
@@ -902,14 +901,13 @@ static int sonypi_misc_release(struct inode *inode, struct file *file)
 
 static int sonypi_misc_open(struct inode *inode, struct file *file)
 {
-	lock_kernel();
 	mutex_lock(&sonypi_device.lock);
 	/* Flush input queue on first open */
 	if (!sonypi_device.open_count)
 		kfifo_reset(sonypi_device.fifo);
 	sonypi_device.open_count++;
 	mutex_unlock(&sonypi_device.lock);
-	unlock_kernel();
+
 	return 0;
 }
 
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2009-10-25  7:30 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-18 21:54 [PATCH] sony_pi: Remove the BKL from sonypi_misc_open John Kacur
2009-10-19  4:19 ` Arnd Bergmann
2009-10-19 18:20   ` John Kacur
2009-10-19 22:00     ` Arnd Bergmann
2009-10-19 22:08       ` Arnd Bergmann
2009-10-21  0:06         ` John Kacur
2009-10-21  8:29           ` Arnd Bergmann
2009-10-21 10:27             ` John Kacur
2009-10-21 13:16               ` Arnd Bergmann
2009-10-22  2:52             ` Christoph Hellwig
2009-10-21 21:31         ` Frederic Weisbecker
2009-10-21 21:41           ` John Kacur
2009-10-21 21:55             ` Frederic Weisbecker
2009-10-21 22:06               ` John Kacur
2009-10-21 22:27                 ` Frederic Weisbecker
2009-10-22  2:55           ` Christoph Hellwig
2009-10-22 13:50             ` Arnd Bergmann
2009-10-25  7:30               ` Christoph Hellwig
2009-10-19 22:30       ` Mattia Dongili

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox