From patchwork Sun May 1 19:00:44 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Lorenz X-Patchwork-Id: 746352 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p41J6HDi030429 for ; Sun, 1 May 2011 19:06:18 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761337Ab1EATGI (ORCPT ); Sun, 1 May 2011 15:06:08 -0400 Received: from mailout-de.gmx.net ([213.165.64.22]:53576 "HELO mailout-de.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1755780Ab1EATGF (ORCPT ); Sun, 1 May 2011 15:06:05 -0400 Received: (qmail invoked by alias); 01 May 2011 19:06:02 -0000 Received: from stgt-5f7018e0.pool.mediaWays.net (EHLO mail.lorenz.priv) [95.112.24.224] by mail.gmx.net (mp022) with SMTP; 01 May 2011 21:06:02 +0200 X-Authenticated: #2283611 X-Provags-ID: V01U2FsdGVkX19qypFTQQ1qahCMnn6BG0uo0j63IN+3uivvv+Qm4i f51dZtmbqnX4Iy Received: from tobias-t61p.localnet (unknown [10.2.3.10]) by mail.lorenz.priv (Postfix) with ESMTPS id E29F0141ED for ; Sun, 1 May 2011 21:06:00 +0200 (CEST) From: Tobias Lorenz To: linux-media@vger.kernel.org Subject: [PATCH 1/6] important fix for rds locking Date: Sun, 1 May 2011 21:00:44 +0200 User-Agent: KMail/1.13.5 (Linux/2.6.38-2-686; KDE/4.4.5; i686; ; ) MIME-Version: 1.0 Message-Id: <201105012100.44349.tobias.lorenz@gmx.net> X-Y-GMX-Trusted: 0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Sun, 01 May 2011 19:06:18 +0000 (UTC) This patch removes a redundant mutex_lock in fops_read. Every rds read attempt would stall otherwise. Signed-off-by: Tobias Lorenz --- drivers/media/radio/si470x/radio-si470x-common.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) @@ -479,9 +478,9 @@ static ssize_t si470x_fops_read(struct file *file, char __user *buf, buf += 3; retval += 3; } + mutex_unlock(&radio->lock); done: - mutex_unlock(&radio->lock); return retval; } diff --git a/drivers/media/radio/si470x/radio-si470x-common.c b/drivers/media/radio/si470x/radio-si470x-common.c index ac76dfe..5cbeeb3 100644 --- a/drivers/media/radio/si470x/radio-si470x-common.c +++ b/drivers/media/radio/si470x/radio-si470x-common.c @@ -438,7 +438,6 @@ static ssize_t si470x_fops_read(struct file *file, char __user *buf, unsigned int block_count = 0; /* switch on rds reception */ - mutex_lock(&radio->lock); if ((radio->registers[SYSCONFIG1] & SYSCONFIG1_RDS) == 0) si470x_rds_on(radio);