Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755329AbZJRVzP (ORCPT ); Sun, 18 Oct 2009 17:55:15 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753311AbZJRVzP (ORCPT ); Sun, 18 Oct 2009 17:55:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9653 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751877AbZJRVzO (ORCPT ); Sun, 18 Oct 2009 17:55:14 -0400 Date: Sun, 18 Oct 2009 23:54:53 +0200 (CEST) From: John Kacur X-X-Sender: jkacur@localhost.localdomain To: linux-kernel@vger.kernel.org, Thomas Gleixner cc: Arnd Bergmann , Alan Cox , Ingo Molnar , Frederic Weisbecker Subject: [PATCH] sony_pi: Remove the BKL from sonypi_misc_open Message-ID: User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1573 Lines: 52 >From b5fefbe4ab8783a0299953b0869cf2af24160875 Mon Sep 17 00:00:00 2001 From: John Kacur 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 --- 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 #include #include -#include #include #include @@ -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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/