diff mbox

[1/6] important fix for rds locking

Message ID 201105012100.44349.tobias.lorenz@gmx.net (mailing list archive)
State Rejected
Headers show

Commit Message

Tobias Lorenz May 1, 2011, 7 p.m. UTC
This patch removes a redundant mutex_lock in fops_read.
Every rds read attempt would stall otherwise.

Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net>
---
 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 mbox

Patch

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);