summaryrefslogtreecommitdiff
path: root/linux/drivers/media/radio/radio-mr800.c
diff options
context:
space:
mode:
authorDouglas Schilling Landgraf <dougsland@redhat.com>2009-02-05 09:57:19 -0200
committerDouglas Schilling Landgraf <dougsland@redhat.com>2009-02-05 09:57:19 -0200
commit08e10a545481449933bbb9a40be2dbb4e3a7a40c (patch)
treebe8c5d582d8b677540f4f532224998f899e326e1 /linux/drivers/media/radio/radio-mr800.c
parent38f50860e8ac9f600fd8240f54f2fdb753f7bb9f (diff)
downloadmediapointer-dvb-s2-08e10a545481449933bbb9a40be2dbb4e3a7a40c.tar.gz
mediapointer-dvb-s2-08e10a545481449933bbb9a40be2dbb4e3a7a40c.tar.bz2
radio-mr800: add few lost mutex locks
From: Alexey Klimov <klimov.linux@gmail.com> Patch adds two lost mutex locks. Priority: normal Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Diffstat (limited to 'linux/drivers/media/radio/radio-mr800.c')
-rw-r--r--linux/drivers/media/radio/radio-mr800.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/linux/drivers/media/radio/radio-mr800.c b/linux/drivers/media/radio/radio-mr800.c
index b6ac1d48d..e1c63d76e 100644
--- a/linux/drivers/media/radio/radio-mr800.c
+++ b/linux/drivers/media/radio/radio-mr800.c
@@ -434,7 +434,10 @@ static int vidioc_s_frequency(struct file *file, void *priv,
if (radio->removed)
return -EIO;
+ mutex_lock(&radio->lock);
radio->curfreq = f->frequency;
+ mutex_unlock(&radio->lock);
+
retval = amradio_setfreq(radio, radio->curfreq);
if (retval < 0)
amradio_dev_warn(&radio->videodev->dev,
@@ -602,7 +605,9 @@ static int usb_amradio_close(struct file *file)
if (!radio)
return -ENODEV;
+ mutex_lock(&radio->lock);
radio->users = 0;
+ mutex_unlock(&radio->lock);
if (!radio->removed) {
retval = amradio_set_mute(radio, AMRADIO_STOP);