Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

authored by

Hans Verkuil and committed by
Mauro Carvalho Chehab
ae09e9e7 f0a12d0c

+10
+2
drivers/media/radio/wl128x/fmdrv.h
··· 30 30 #include <linux/timer.h> 31 31 #include <media/v4l2-ioctl.h> 32 32 #include <media/v4l2-common.h> 33 + #include <media/v4l2-device.h> 33 34 #include <media/v4l2-ctrls.h> 34 35 35 36 #define FM_DRV_VERSION "0.1.1" ··· 203 202 /* FM driver operation structure */ 204 203 struct fmdev { 205 204 struct video_device *radio_dev; /* V4L2 video device pointer */ 205 + struct v4l2_device v4l2_dev; /* V4L2 top level struct */ 206 206 struct snd_card *card; /* Card which holds FM mixer controls */ 207 207 u16 asci_id; 208 208 spinlock_t rds_buff_lock; /* To protect access to RDS buffer */
+8
drivers/media/radio/wl128x/fmdrv_v4l2.c
··· 533 533 struct v4l2_ctrl *ctrl; 534 534 int ret; 535 535 536 + strlcpy(fmdev->v4l2_dev.name, FM_DRV_NAME, sizeof(fmdev->v4l2_dev.name)); 537 + ret = v4l2_device_register(NULL, &fmdev->v4l2_dev); 538 + if (ret < 0) 539 + return ret; 540 + 536 541 /* Init mutex for core locking */ 537 542 mutex_init(&fmdev->mutex); 538 543 ··· 554 549 video_set_drvdata(gradio_dev, fmdev); 555 550 556 551 gradio_dev->lock = &fmdev->mutex; 552 + gradio_dev->v4l2_dev = &fmdev->v4l2_dev; 557 553 558 554 /* Register with V4L2 subsystem as RADIO device */ 559 555 if (video_register_device(gradio_dev, VFL_TYPE_RADIO, radio_nr)) { ··· 616 610 617 611 /* Unregister RADIO device from V4L2 subsystem */ 618 612 video_unregister_device(gradio_dev); 613 + 614 + v4l2_device_unregister(&fmdev->v4l2_dev); 619 615 620 616 return fmdev; 621 617 }