summaryrefslogtreecommitdiff
path: root/linux/drivers/media/radio/radio-si470x.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/radio/radio-si470x.c')
-rw-r--r--linux/drivers/media/radio/radio-si470x.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/linux/drivers/media/radio/radio-si470x.c b/linux/drivers/media/radio/radio-si470x.c
index 110989cac..3b1f630a9 100644
--- a/linux/drivers/media/radio/radio-si470x.c
+++ b/linux/drivers/media/radio/radio-si470x.c
@@ -1079,6 +1079,7 @@ static int si470x_fops_open(struct inode *inode, struct file *file)
struct si470x_device *radio = video_get_drvdata(video_devdata(file));
int retval;
+ lock_kernel();
radio->users++;
retval = usb_autopm_get_interface(radio->intf);
@@ -1095,6 +1096,7 @@ static int si470x_fops_open(struct inode *inode, struct file *file)
}
done:
+ unlock_kernel();
return retval;
}
@@ -1591,15 +1593,7 @@ done:
return retval;
}
-
-/*
- * si470x_viddev_tamples - video device interface
- */
-static struct video_device si470x_viddev_template = {
- .fops = &si470x_fops,
- .name = DRIVER_NAME,
- .type = VID_TYPE_TUNER,
- .release = video_device_release,
+static const struct v4l2_ioctl_ops si470x_ioctl_ops = {
.vidioc_querycap = si470x_vidioc_querycap,
.vidioc_g_input = si470x_vidioc_g_input,
.vidioc_s_input = si470x_vidioc_s_input,
@@ -1613,7 +1607,16 @@ static struct video_device si470x_viddev_template = {
.vidioc_g_frequency = si470x_vidioc_g_frequency,
.vidioc_s_frequency = si470x_vidioc_s_frequency,
.vidioc_s_hw_freq_seek = si470x_vidioc_s_hw_freq_seek,
- .owner = THIS_MODULE,
+};
+
+/*
+ * si470x_viddev_tamples - video device interface
+ */
+static struct video_device si470x_viddev_template = {
+ .fops = &si470x_fops,
+ .ioctl_ops = &si470x_ioctl_ops,
+ .name = DRIVER_NAME,
+ .release = video_device_release,
};