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

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

[media] wl128x: add missing struct v4l2_device



This struct is now required for all video device nodes, but it was missing
in this driver.

Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent f0a12d0c
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -30,6 +30,7 @@
#include <linux/timer.h>
#include <linux/timer.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-common.h>
#include <media/v4l2-common.h>
#include <media/v4l2-device.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-ctrls.h>


#define FM_DRV_VERSION            "0.1.1"
#define FM_DRV_VERSION            "0.1.1"
@@ -202,6 +203,7 @@ struct fmtx_data {
/* FM driver operation structure */
/* FM driver operation structure */
struct fmdev {
struct fmdev {
	struct video_device *radio_dev;	/* V4L2 video device pointer */
	struct video_device *radio_dev;	/* V4L2 video device pointer */
	struct v4l2_device v4l2_dev;	/* V4L2 top level struct */
	struct snd_card *card;	/* Card which holds FM mixer controls */
	struct snd_card *card;	/* Card which holds FM mixer controls */
	u16 asci_id;
	u16 asci_id;
	spinlock_t rds_buff_lock; /* To protect access to RDS buffer */
	spinlock_t rds_buff_lock; /* To protect access to RDS buffer */
+8 −0
Original line number Original line Diff line number Diff line
@@ -533,6 +533,11 @@ int fm_v4l2_init_video_device(struct fmdev *fmdev, int radio_nr)
	struct v4l2_ctrl *ctrl;
	struct v4l2_ctrl *ctrl;
	int ret;
	int ret;


	strlcpy(fmdev->v4l2_dev.name, FM_DRV_NAME, sizeof(fmdev->v4l2_dev.name));
	ret = v4l2_device_register(NULL, &fmdev->v4l2_dev);
	if (ret < 0)
		return ret;

	/* Init mutex for core locking */
	/* Init mutex for core locking */
	mutex_init(&fmdev->mutex);
	mutex_init(&fmdev->mutex);


@@ -549,6 +554,7 @@ int fm_v4l2_init_video_device(struct fmdev *fmdev, int radio_nr)
	video_set_drvdata(gradio_dev, fmdev);
	video_set_drvdata(gradio_dev, fmdev);


	gradio_dev->lock = &fmdev->mutex;
	gradio_dev->lock = &fmdev->mutex;
	gradio_dev->v4l2_dev = &fmdev->v4l2_dev;


	/* Register with V4L2 subsystem as RADIO device */
	/* Register with V4L2 subsystem as RADIO device */
	if (video_register_device(gradio_dev, VFL_TYPE_RADIO, radio_nr)) {
	if (video_register_device(gradio_dev, VFL_TYPE_RADIO, radio_nr)) {
@@ -611,5 +617,7 @@ void *fm_v4l2_deinit_video_device(void)
	/* Unregister RADIO device from V4L2 subsystem */
	/* Unregister RADIO device from V4L2 subsystem */
	video_unregister_device(gradio_dev);
	video_unregister_device(gradio_dev);


	v4l2_device_unregister(&fmdev->v4l2_dev);

	return fmdev;
	return fmdev;
}
}