aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ov511.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/ov511.c')
-rw-r--r--drivers/media/video/ov511.c38
1 files changed, 18 insertions, 20 deletions
diff --git a/drivers/media/video/ov511.c b/drivers/media/video/ov511.c
index eafb0c7736e6..9edaca4371d7 100644
--- a/drivers/media/video/ov511.c
+++ b/drivers/media/video/ov511.c
@@ -4666,9 +4666,7 @@ static const struct file_operations ov511_fops = {
4666}; 4666};
4667 4667
4668static struct video_device vdev_template = { 4668static struct video_device vdev_template = {
4669 .owner = THIS_MODULE,
4670 .name = "OV511 USB Camera", 4669 .name = "OV511 USB Camera",
4671 .type = VID_TYPE_CAPTURE,
4672 .fops = &ov511_fops, 4670 .fops = &ov511_fops,
4673 .release = video_device_release, 4671 .release = video_device_release,
4674 .minor = -1, 4672 .minor = -1,
@@ -5661,43 +5659,43 @@ static int ov_create_sysfs(struct video_device *vdev)
5661{ 5659{
5662 int rc; 5660 int rc;
5663 5661
5664 rc = video_device_create_file(vdev, &dev_attr_custom_id); 5662 rc = device_create_file(&vdev->dev, &dev_attr_custom_id);
5665 if (rc) goto err; 5663 if (rc) goto err;
5666 rc = video_device_create_file(vdev, &dev_attr_model); 5664 rc = device_create_file(&vdev->dev, &dev_attr_model);
5667 if (rc) goto err_id; 5665 if (rc) goto err_id;
5668 rc = video_device_create_file(vdev, &dev_attr_bridge); 5666 rc = device_create_file(&vdev->dev, &dev_attr_bridge);
5669 if (rc) goto err_model; 5667 if (rc) goto err_model;
5670 rc = video_device_create_file(vdev, &dev_attr_sensor); 5668 rc = device_create_file(&vdev->dev, &dev_attr_sensor);
5671 if (rc) goto err_bridge; 5669 if (rc) goto err_bridge;
5672 rc = video_device_create_file(vdev, &dev_attr_brightness); 5670 rc = device_create_file(&vdev->dev, &dev_attr_brightness);
5673 if (rc) goto err_sensor; 5671 if (rc) goto err_sensor;
5674 rc = video_device_create_file(vdev, &dev_attr_saturation); 5672 rc = device_create_file(&vdev->dev, &dev_attr_saturation);
5675 if (rc) goto err_bright; 5673 if (rc) goto err_bright;
5676 rc = video_device_create_file(vdev, &dev_attr_contrast); 5674 rc = device_create_file(&vdev->dev, &dev_attr_contrast);
5677 if (rc) goto err_sat; 5675 if (rc) goto err_sat;
5678 rc = video_device_create_file(vdev, &dev_attr_hue); 5676 rc = device_create_file(&vdev->dev, &dev_attr_hue);
5679 if (rc) goto err_contrast; 5677 if (rc) goto err_contrast;
5680 rc = video_device_create_file(vdev, &dev_attr_exposure); 5678 rc = device_create_file(&vdev->dev, &dev_attr_exposure);
5681 if (rc) goto err_hue; 5679 if (rc) goto err_hue;
5682 5680
5683 return 0; 5681 return 0;
5684 5682
5685err_hue: 5683err_hue:
5686 video_device_remove_file(vdev, &dev_attr_hue); 5684 device_remove_file(&vdev->dev, &dev_attr_hue);
5687err_contrast: 5685err_contrast:
5688 video_device_remove_file(vdev, &dev_attr_contrast); 5686 device_remove_file(&vdev->dev, &dev_attr_contrast);
5689err_sat: 5687err_sat:
5690 video_device_remove_file(vdev, &dev_attr_saturation); 5688 device_remove_file(&vdev->dev, &dev_attr_saturation);
5691err_bright: 5689err_bright:
5692 video_device_remove_file(vdev, &dev_attr_brightness); 5690 device_remove_file(&vdev->dev, &dev_attr_brightness);
5693err_sensor: 5691err_sensor:
5694 video_device_remove_file(vdev, &dev_attr_sensor); 5692 device_remove_file(&vdev->dev, &dev_attr_sensor);
5695err_bridge: 5693err_bridge:
5696 video_device_remove_file(vdev, &dev_attr_bridge); 5694 device_remove_file(&vdev->dev, &dev_attr_bridge);
5697err_model: 5695err_model:
5698 video_device_remove_file(vdev, &dev_attr_model); 5696 device_remove_file(&vdev->dev, &dev_attr_model);
5699err_id: 5697err_id:
5700 video_device_remove_file(vdev, &dev_attr_custom_id); 5698 device_remove_file(&vdev->dev, &dev_attr_custom_id);
5701err: 5699err:
5702 return rc; 5700 return rc;
5703} 5701}
@@ -5833,7 +5831,7 @@ ov51x_probe(struct usb_interface *intf, const struct usb_device_id *id)
5833 goto error; 5831 goto error;
5834 5832
5835 memcpy(ov->vdev, &vdev_template, sizeof(*ov->vdev)); 5833 memcpy(ov->vdev, &vdev_template, sizeof(*ov->vdev));
5836 ov->vdev->dev = &intf->dev; 5834 ov->vdev->parent = &intf->dev;
5837 video_set_drvdata(ov->vdev, ov); 5835 video_set_drvdata(ov->vdev, ov);
5838 5836
5839 for (i = 0; i < OV511_MAX_UNIT_VIDEO; i++) { 5837 for (i = 0; i < OV511_MAX_UNIT_VIDEO; i++) {