diff options
-rw-r--r-- | linux/drivers/media/radio/radio-mr800.c | 5 |
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 b6ac1d48d..e1c63d76e 100644 --- a/linux/drivers/media/radio/radio-mr800.c +++ b/linux/drivers/media/radio/radio-mr800.c @@ -434,7 +434,10 @@ static int vidioc_s_frequency(struct file *file, void *priv, if (radio->removed) return -EIO; + mutex_lock(&radio->lock); radio->curfreq = f->frequency; + mutex_unlock(&radio->lock); + retval = amradio_setfreq(radio, radio->curfreq); if (retval < 0) amradio_dev_warn(&radio->videodev->dev, @@ -602,7 +605,9 @@ static int usb_amradio_close(struct file *file) if (!radio) return -ENODEV; + mutex_lock(&radio->lock); radio->users = 0; + mutex_unlock(&radio->lock); if (!radio->removed) { retval = amradio_set_mute(radio, AMRADIO_STOP); |