aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/radio
diff options
context:
space:
mode:
authorAlexey Klimov <klimov.linux@gmail.com>2009-02-05 06:57:19 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 11:42:40 -0400
commit52433bbbef633047838dcc5a735ee241a05234a0 (patch)
tree9d3a11768f64a86bd0828dfe3c0f29fed7d5643f /drivers/media/radio
parent1bb16d7156d7d6b7e357de561bf965fd65545bb0 (diff)
V4L/DVB (10461): radio-mr800: add few lost mutex locks
Patch adds two lost mutex locks. Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/radio')
-rw-r--r--drivers/media/radio/radio-mr800.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/media/radio/radio-mr800.c b/drivers/media/radio/radio-mr800.c
index 25ccf21c469e..56f1fac6d28d 100644
--- a/drivers/media/radio/radio-mr800.c
+++ b/drivers/media/radio/radio-mr800.c
@@ -431,7 +431,10 @@ static int vidioc_s_frequency(struct file *file, void *priv,
431 if (radio->removed) 431 if (radio->removed)
432 return -EIO; 432 return -EIO;
433 433
434 mutex_lock(&radio->lock);
434 radio->curfreq = f->frequency; 435 radio->curfreq = f->frequency;
436 mutex_unlock(&radio->lock);
437
435 retval = amradio_setfreq(radio, radio->curfreq); 438 retval = amradio_setfreq(radio, radio->curfreq);
436 if (retval < 0) 439 if (retval < 0)
437 amradio_dev_warn(&radio->videodev->dev, 440 amradio_dev_warn(&radio->videodev->dev,
@@ -599,7 +602,9 @@ static int usb_amradio_close(struct file *file)
599 if (!radio) 602 if (!radio)
600 return -ENODEV; 603 return -ENODEV;
601 604
605 mutex_lock(&radio->lock);
602 radio->users = 0; 606 radio->users = 0;
607 mutex_unlock(&radio->lock);
603 608
604 if (!radio->removed) { 609 if (!radio->removed) {
605 retval = amradio_set_mute(radio, AMRADIO_STOP); 610 retval = amradio_set_mute(radio, AMRADIO_STOP);