V4L/DVB (9305): radio-mr800: Add BKL for usb_amradio_open()

Added BKL for usb_amradio_open()

Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Alexey Klimov 2008-10-19 23:56:23 -03:00 committed by Mauro Carvalho Chehab
parent 223377e76d
commit 0fabb78332
1 changed files with 5 additions and 0 deletions

View File

@ -469,16 +469,21 @@ static int usb_amradio_open(struct inode *inode, struct file *file)
{ {
struct amradio_device *radio = video_get_drvdata(video_devdata(file)); struct amradio_device *radio = video_get_drvdata(video_devdata(file));
lock_kernel();
radio->users = 1; radio->users = 1;
radio->muted = 1; radio->muted = 1;
if (amradio_start(radio) < 0) { if (amradio_start(radio) < 0) {
warn("Radio did not start up properly"); warn("Radio did not start up properly");
radio->users = 0; radio->users = 0;
unlock_kernel();
return -EIO; return -EIO;
} }
if (amradio_setfreq(radio, radio->curfreq) < 0) if (amradio_setfreq(radio, radio->curfreq) < 0)
warn("Set frequency failed"); warn("Set frequency failed");
unlock_kernel();
return 0; return 0;
} }