Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f894dfd7 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (8488): videodev: remove some CONFIG_VIDEO_V4L1_COMPAT code from v4l2-dev.h



The video_device_create_file and video_device_remove_file functions can be
removed from v4l2-dev.h, removing the dependency on videodev.h in v4l2-dev.h.

Also removed a few more videodev.h includes that should have been videodev2.h.

Signed-off-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 668acf32
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/videodev.h>
#include <linux/videodev2.h>
#include <media/v4l2-common.h>
#include <media/tuner.h>
#include "tuner-i2c.h"
+1 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@
 */
#include <linux/delay.h>
#include <linux/i2c.h>
#include <linux/videodev.h>
#include <linux/videodev2.h>
#include <media/tuner.h>
#include <media/v4l2-common.h>
#include <media/tuner-types.h>
+1 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@
#include "cpia2.h"

#include <linux/slab.h>
#include <linux/mm.h>
#include <linux/vmalloc.h>
#include <linux/firmware.h>

+17 −17
Original line number Diff line number Diff line
@@ -5660,43 +5660,43 @@ static int ov_create_sysfs(struct video_device *vdev)
{
	int rc;

	rc = video_device_create_file(vdev, &dev_attr_custom_id);
	rc = device_create_file(&vdev->dev, &dev_attr_custom_id);
	if (rc) goto err;
	rc = video_device_create_file(vdev, &dev_attr_model);
	rc = device_create_file(&vdev->dev, &dev_attr_model);
	if (rc) goto err_id;
	rc = video_device_create_file(vdev, &dev_attr_bridge);
	rc = device_create_file(&vdev->dev, &dev_attr_bridge);
	if (rc) goto err_model;
	rc = video_device_create_file(vdev, &dev_attr_sensor);
	rc = device_create_file(&vdev->dev, &dev_attr_sensor);
	if (rc) goto err_bridge;
	rc = video_device_create_file(vdev, &dev_attr_brightness);
	rc = device_create_file(&vdev->dev, &dev_attr_brightness);
	if (rc) goto err_sensor;
	rc = video_device_create_file(vdev, &dev_attr_saturation);
	rc = device_create_file(&vdev->dev, &dev_attr_saturation);
	if (rc) goto err_bright;
	rc = video_device_create_file(vdev, &dev_attr_contrast);
	rc = device_create_file(&vdev->dev, &dev_attr_contrast);
	if (rc) goto err_sat;
	rc = video_device_create_file(vdev, &dev_attr_hue);
	rc = device_create_file(&vdev->dev, &dev_attr_hue);
	if (rc) goto err_contrast;
	rc = video_device_create_file(vdev, &dev_attr_exposure);
	rc = device_create_file(&vdev->dev, &dev_attr_exposure);
	if (rc) goto err_hue;

	return 0;

err_hue:
	video_device_remove_file(vdev, &dev_attr_hue);
	device_remove_file(&vdev->dev, &dev_attr_hue);
err_contrast:
	video_device_remove_file(vdev, &dev_attr_contrast);
	device_remove_file(&vdev->dev, &dev_attr_contrast);
err_sat:
	video_device_remove_file(vdev, &dev_attr_saturation);
	device_remove_file(&vdev->dev, &dev_attr_saturation);
err_bright:
	video_device_remove_file(vdev, &dev_attr_brightness);
	device_remove_file(&vdev->dev, &dev_attr_brightness);
err_sensor:
	video_device_remove_file(vdev, &dev_attr_sensor);
	device_remove_file(&vdev->dev, &dev_attr_sensor);
err_bridge:
	video_device_remove_file(vdev, &dev_attr_bridge);
	device_remove_file(&vdev->dev, &dev_attr_bridge);
err_model:
	video_device_remove_file(vdev, &dev_attr_model);
	device_remove_file(&vdev->dev, &dev_attr_model);
err_id:
	video_device_remove_file(vdev, &dev_attr_custom_id);
	device_remove_file(&vdev->dev, &dev_attr_custom_id);
err:
	return rc;
}
+6 −5
Original line number Diff line number Diff line
@@ -1047,19 +1047,20 @@ static int pwc_create_sysfs_files(struct video_device *vdev)
	struct pwc_device *pdev = video_get_drvdata(vdev);
	int rc;

	rc = video_device_create_file(vdev, &dev_attr_button);
	rc = device_create_file(&vdev->dev, &dev_attr_button);
	if (rc)
		goto err;
	if (pdev->features & FEATURE_MOTOR_PANTILT) {
		rc = video_device_create_file(vdev, &dev_attr_pan_tilt);
		rc = device_create_file(&vdev->dev, &dev_attr_pan_tilt);
		if (rc) goto err_button;
	}

	return 0;

err_button:
	video_device_remove_file(vdev, &dev_attr_button);
	device_remove_file(&vdev->dev, &dev_attr_button);
err:
	PWC_ERROR("Could not create sysfs files.\n");
	return rc;
}

@@ -1067,8 +1068,8 @@ static void pwc_remove_sysfs_files(struct video_device *vdev)
{
	struct pwc_device *pdev = video_get_drvdata(vdev);
	if (pdev->features & FEATURE_MOTOR_PANTILT)
		video_device_remove_file(vdev, &dev_attr_pan_tilt);
	video_device_remove_file(vdev, &dev_attr_button);
		device_remove_file(&vdev->dev, &dev_attr_pan_tilt);
	device_remove_file(&vdev->dev, &dev_attr_button);
}

#ifdef CONFIG_USB_PWC_DEBUG
Loading