Commit 3d91b856 authored by Paul Elder's avatar Paul Elder Committed by Mauro Carvalho Chehab

media: rkisp1: capture: Bypass the main device for handling querycap

When handling querycap, the capture node would access the main rkisp1
device unnecessarily. Get the information from the most direct source.
Signed-off-by: default avatarPaul Elder <paul.elder@ideasonboard.com>
Reviewed-by: default avatarDafna Hirschfeld <dafna@fastmail.com>
Reviewed-by: default avatarRicardo Ribalda <ribalda@chromium.org>
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent a124765f
......@@ -1248,11 +1248,8 @@ static int rkisp1_g_fmt_vid_cap_mplane(struct file *file, void *fh,
static int
rkisp1_querycap(struct file *file, void *priv, struct v4l2_capability *cap)
{
struct rkisp1_capture *cap_dev = video_drvdata(file);
struct rkisp1_device *rkisp1 = cap_dev->rkisp1;
strscpy(cap->driver, rkisp1->dev->driver->name, sizeof(cap->driver));
strscpy(cap->card, rkisp1->dev->driver->name, sizeof(cap->card));
strscpy(cap->driver, RKISP1_DRIVER_NAME, sizeof(cap->driver));
strscpy(cap->card, RKISP1_DRIVER_NAME, sizeof(cap->card));
strscpy(cap->bus_info, RKISP1_BUS_INFO, sizeof(cap->bus_info));
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment