summaryrefslogtreecommitdiff
path: root/linux/drivers/media/radio/radio-mr800.c
diff options
context:
space:
mode:
authorDouglas Schilling Landgraf <dougsland@linuxtv.org>2008-10-20 00:56:23 -0200
committerDouglas Schilling Landgraf <dougsland@linuxtv.org>2008-10-20 00:56:23 -0200
commit7681262f35ef9d10b8389c719207aa55a357b4c0 (patch)
tree0309f4611d1d96fc8de91e6fab4d58052da5624e /linux/drivers/media/radio/radio-mr800.c
parent832d1aea3d116c85b4f80389a150c23aacf8d148 (diff)
downloadmediapointer-dvb-s2-7681262f35ef9d10b8389c719207aa55a357b4c0.tar.gz
mediapointer-dvb-s2-7681262f35ef9d10b8389c719207aa55a357b4c0.tar.bz2
radio-mr800: Add BKL for usb_amradio_open()
From: Alexey Klimov <klimov.linux@gmail.com> Added BKL for usb_amradio_open() Priority: high Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org>
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 2ae8e1447..5941127a5 100644
--- a/linux/drivers/media/radio/radio-mr800.c
+++ b/linux/drivers/media/radio/radio-mr800.c
@@ -472,16 +472,21 @@ static int usb_amradio_open(struct inode *inode, struct file *file)
{
struct amradio_device *radio = video_get_drvdata(video_devdata(file));
+ lock_kernel();
+
radio->users = 1;
radio->muted = 1;
if (amradio_start(radio) < 0) {
warn("Radio did not start up properly");
radio->users = 0;
+ unlock_kernel();
return -EIO;
}
if (amradio_setfreq(radio, radio->curfreq) < 0)
warn("Set frequency failed");
+
+ unlock_kernel();
return 0;
}