From: Sebastian Andrzej Siewior Subject: [PATCH] spi/spidev: remove BLK Date: Thu, 10 Sep 2009 15:04:09 +0200 Message-ID: <20090910130409.GA23433@Chamillionaire.breakpoint.cc> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: David Brownell Return-path: Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: linux-spi.vger.kernel.org the BLK in open() is not required: - device_list is protected by device_list_lock - spidev->user is only access with device_list_lock locked - spidev->buffer is protected by spidev->buf_lock. Allocation & free is done by the first/last user with device_list_lock locked. Signed-off-by: Sebastian Andrzej Siewior --- drivers/spi/spidev.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c index 606e7a4..f362c40 100644 --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include @@ -477,7 +476,6 @@ static int spidev_open(struct inode *inode, struct file *filp) struct spidev_data *spidev; int status = -ENXIO; - lock_kernel(); mutex_lock(&device_list_lock); list_for_each_entry(spidev, &device_list, device_entry) { @@ -503,7 +501,6 @@ static int spidev_open(struct inode *inode, struct file *filp) pr_debug("spidev: nothing for minor %d\n", iminor(inode)); mutex_unlock(&device_list_lock); - unlock_kernel(); return status; } -- 1.6.3.3 ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july