From: Alessio Igor Bogani <abogani@texware.it>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Alessio Igor Bogani <abogani@texware.it>
Subject: [PATCH] sony-laptop: Kill the BKL
Date: Fri, 20 Mar 2009 19:02:45 +0100 [thread overview]
Message-ID: <1237572165-6494-1-git-send-email-abogani@texware.it> (raw)
Signed-off-by: Alessio Igor Bogani <abogani@texware.it>
---
drivers/platform/x86/sony-laptop.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
index 537959d..15f940b 100644
--- a/drivers/platform/x86/sony-laptop.c
+++ b/drivers/platform/x86/sony-laptop.c
@@ -46,7 +46,6 @@
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
-#include <linux/smp_lock.h>
#include <linux/types.h>
#include <linux/backlight.h>
#include <linux/platform_device.h>
@@ -1934,10 +1933,15 @@ static int sonypi_misc_release(struct inode *inode, struct file *file)
static int sonypi_misc_open(struct inode *inode, struct file *file)
{
/* Flush input queue on first open */
- lock_kernel();
+ unsigned long flags;
+
+ spin_lock_irqsave(sonypi_compat.fifo->lock, flags);
+
if (atomic_inc_return(&sonypi_compat.open_count) == 1)
- kfifo_reset(sonypi_compat.fifo);
- unlock_kernel();
+ __kfifo_reset(sonypi_compat.fifo);
+
+ spin_unlock_irqrestore(sonypi_compat.fifo->lock, flags);
+
return 0;
}
--
1.6.0.4
next reply other threads:[~2009-03-20 18:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-20 18:02 Alessio Igor Bogani [this message]
2009-03-21 2:29 ` Mattia Dongili
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1237572165-6494-1-git-send-email-abogani@texware.it \
--to=abogani@texware.it \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®