hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/media/platform/vsp1/vsp1_histo.c
....@@ -426,11 +426,9 @@
426426 | V4L2_CAP_VIDEO_CAPTURE_MPLANE
427427 | V4L2_CAP_VIDEO_OUTPUT_MPLANE
428428 | V4L2_CAP_META_CAPTURE;
429
- cap->device_caps = V4L2_CAP_META_CAPTURE
430
- | V4L2_CAP_STREAMING;
431429
432
- strlcpy(cap->driver, "vsp1", sizeof(cap->driver));
433
- strlcpy(cap->card, histo->video.name, sizeof(cap->card));
430
+ strscpy(cap->driver, "vsp1", sizeof(cap->driver));
431
+ strscpy(cap->card, histo->video.name, sizeof(cap->card));
434432 snprintf(cap->bus_info, sizeof(cap->bus_info), "platform:%s",
435433 dev_name(histo->entity.vsp1->dev));
436434
....@@ -553,9 +551,10 @@
553551 histo->video.fops = &histo_v4l2_fops;
554552 snprintf(histo->video.name, sizeof(histo->video.name),
555553 "%s histo", histo->entity.subdev.name);
556
- histo->video.vfl_type = VFL_TYPE_GRABBER;
554
+ histo->video.vfl_type = VFL_TYPE_VIDEO;
557555 histo->video.release = video_device_release_empty;
558556 histo->video.ioctl_ops = &histo_v4l2_ioctl_ops;
557
+ histo->video.device_caps = V4L2_CAP_META_CAPTURE | V4L2_CAP_STREAMING;
559558
560559 video_set_drvdata(&histo->video, histo);
561560
....@@ -577,7 +576,7 @@
577576
578577 /* ... and register the video device. */
579578 histo->video.queue = &histo->queue;
580
- ret = video_register_device(&histo->video, VFL_TYPE_GRABBER, -1);
579
+ ret = video_register_device(&histo->video, VFL_TYPE_VIDEO, -1);
581580 if (ret < 0) {
582581 dev_err(vsp1->dev, "failed to register video device\n");
583582 goto error;