diff options
Diffstat (limited to 'drivers/media/radio/radio-miropcm20.c')
| -rw-r--r-- | drivers/media/radio/radio-miropcm20.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/radio/radio-miropcm20.c b/drivers/media/radio/radio-miropcm20.c index 4ff885445fd4..3fb76e3834c9 100644 --- a/drivers/media/radio/radio-miropcm20.c +++ b/drivers/media/radio/radio-miropcm20.c | |||
| @@ -33,6 +33,7 @@ struct pcm20 { | |||
| 33 | unsigned long freq; | 33 | unsigned long freq; |
| 34 | int muted; | 34 | int muted; |
| 35 | struct snd_miro_aci *aci; | 35 | struct snd_miro_aci *aci; |
| 36 | struct mutex lock; | ||
| 36 | }; | 37 | }; |
| 37 | 38 | ||
| 38 | static struct pcm20 pcm20_card = { | 39 | static struct pcm20 pcm20_card = { |
| @@ -72,7 +73,7 @@ static int pcm20_setfreq(struct pcm20 *dev, unsigned long freq) | |||
| 72 | 73 | ||
| 73 | static const struct v4l2_file_operations pcm20_fops = { | 74 | static const struct v4l2_file_operations pcm20_fops = { |
| 74 | .owner = THIS_MODULE, | 75 | .owner = THIS_MODULE, |
| 75 | .ioctl = video_ioctl2, | 76 | .unlocked_ioctl = video_ioctl2, |
| 76 | }; | 77 | }; |
| 77 | 78 | ||
| 78 | static int vidioc_querycap(struct file *file, void *priv, | 79 | static int vidioc_querycap(struct file *file, void *priv, |
| @@ -229,7 +230,7 @@ static int __init pcm20_init(void) | |||
| 229 | return -ENODEV; | 230 | return -ENODEV; |
| 230 | } | 231 | } |
| 231 | strlcpy(v4l2_dev->name, "miropcm20", sizeof(v4l2_dev->name)); | 232 | strlcpy(v4l2_dev->name, "miropcm20", sizeof(v4l2_dev->name)); |
| 232 | 233 | mutex_init(&dev->lock); | |
| 233 | 234 | ||
| 234 | res = v4l2_device_register(NULL, v4l2_dev); | 235 | res = v4l2_device_register(NULL, v4l2_dev); |
| 235 | if (res < 0) { | 236 | if (res < 0) { |
| @@ -242,6 +243,7 @@ static int __init pcm20_init(void) | |||
| 242 | dev->vdev.fops = &pcm20_fops; | 243 | dev->vdev.fops = &pcm20_fops; |
| 243 | dev->vdev.ioctl_ops = &pcm20_ioctl_ops; | 244 | dev->vdev.ioctl_ops = &pcm20_ioctl_ops; |
| 244 | dev->vdev.release = video_device_release_empty; | 245 | dev->vdev.release = video_device_release_empty; |
| 246 | dev->vdev.lock = &dev->lock; | ||
| 245 | video_set_drvdata(&dev->vdev, dev); | 247 | video_set_drvdata(&dev->vdev, dev); |
| 246 | 248 | ||
| 247 | if (video_register_device(&dev->vdev, VFL_TYPE_RADIO, radio_nr) < 0) | 249 | if (video_register_device(&dev->vdev, VFL_TYPE_RADIO, radio_nr) < 0) |
