]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (9305): radio-mr800: Add BKL for usb_amradio_open()
authorAlexey Klimov <klimov.linux@gmail.com>
Mon, 20 Oct 2008 02:56:23 +0000 (23:56 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 21 Oct 2008 16:29:17 +0000 (14:29 -0200)
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>
drivers/media/radio/radio-mr800.c

index a33717c48003c8def8a0449e9f9a582732c6a5e9..256cbeffdcb6c274a80657fab1eb23f107e0b976 100644 (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));
 
+       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;
 }