From 0fabb78332aee7d5dd4a0a31228b9266de71182f Mon Sep 17 00:00:00 2001 From: Alexey Klimov Date: Sun, 19 Oct 2008 23:56:23 -0300 Subject: [PATCH] V4L/DVB (9305): radio-mr800: Add BKL for usb_amradio_open() Added BKL for usb_amradio_open() Signed-off-by: Alexey Klimov Signed-off-by: Douglas Schilling Landgraf Signed-off-by: Mauro Carvalho Chehab --- drivers/media/radio/radio-mr800.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/media/radio/radio-mr800.c b/drivers/media/radio/radio-mr800.c index a33717c..256cbef 100644 --- a/drivers/media/radio/radio-mr800.c +++ b/drivers/media/radio/radio-mr800.c @@ -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; } -- 2.7.4