diff options
author | Alexey Klimov <klimov.linux@gmail.com> | 2008-10-19 22:56:23 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-21 12:29:17 -0400 |
commit | 0fabb78332aee7d5dd4a0a31228b9266de71182f (patch) | |
tree | 8448d2f813a01f433f564fa631bf5c49a813e978 | |
parent | 223377e76d68c8015f1c809d3c831423de7b1fb6 (diff) |
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>
-rw-r--r-- | drivers/media/radio/radio-mr800.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/media/radio/radio-mr800.c b/drivers/media/radio/radio-mr800.c index a33717c4800..256cbeffdcb 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) | |||
469 | { | 469 | { |
470 | struct amradio_device *radio = video_get_drvdata(video_devdata(file)); | 470 | struct amradio_device *radio = video_get_drvdata(video_devdata(file)); |
471 | 471 | ||
472 | lock_kernel(); | ||
473 | |||
472 | radio->users = 1; | 474 | radio->users = 1; |
473 | radio->muted = 1; | 475 | radio->muted = 1; |
474 | 476 | ||
475 | if (amradio_start(radio) < 0) { | 477 | if (amradio_start(radio) < 0) { |
476 | warn("Radio did not start up properly"); | 478 | warn("Radio did not start up properly"); |
477 | radio->users = 0; | 479 | radio->users = 0; |
480 | unlock_kernel(); | ||
478 | return -EIO; | 481 | return -EIO; |
479 | } | 482 | } |
480 | if (amradio_setfreq(radio, radio->curfreq) < 0) | 483 | if (amradio_setfreq(radio, radio->curfreq) < 0) |
481 | warn("Set frequency failed"); | 484 | warn("Set frequency failed"); |
485 | |||
486 | unlock_kernel(); | ||
482 | return 0; | 487 | return 0; |
483 | } | 488 | } |
484 | 489 | ||