Commit de26c90f authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

sunxi-csi: fill in bus_info of media device

This fixes a v4l2-compliance warning:

Required ioctls:
                warn: v4l2-test-media.cpp(52): empty bus_info
        test MEDIA_IOC_DEVICE_INFO: OK
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: default avatarMaxime Ripard <mripard@kernel.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 77d7ceb1
...@@ -191,6 +191,8 @@ static int sun4i_csi_probe(struct platform_device *pdev) ...@@ -191,6 +191,8 @@ static int sun4i_csi_probe(struct platform_device *pdev)
strscpy(csi->mdev.model, "Allwinner Video Capture Device", strscpy(csi->mdev.model, "Allwinner Video Capture Device",
sizeof(csi->mdev.model)); sizeof(csi->mdev.model));
csi->mdev.hw_revision = 0; csi->mdev.hw_revision = 0;
snprintf(csi->mdev.bus_info, sizeof(csi->mdev.bus_info), "platform:%s",
dev_name(csi->dev));
media_device_init(&csi->mdev); media_device_init(&csi->mdev);
csi->v4l.mdev = &csi->mdev; csi->v4l.mdev = &csi->mdev;
......
...@@ -733,6 +733,8 @@ static int sun6i_csi_v4l2_init(struct sun6i_csi *csi) ...@@ -733,6 +733,8 @@ static int sun6i_csi_v4l2_init(struct sun6i_csi *csi)
strscpy(csi->media_dev.model, "Allwinner Video Capture Device", strscpy(csi->media_dev.model, "Allwinner Video Capture Device",
sizeof(csi->media_dev.model)); sizeof(csi->media_dev.model));
csi->media_dev.hw_revision = 0; csi->media_dev.hw_revision = 0;
snprintf(csi->media_dev.bus_info, sizeof(csi->media_dev.bus_info),
"platform:%s", dev_name(csi->dev));
media_device_init(&csi->media_dev); media_device_init(&csi->media_dev);
v4l2_async_notifier_init(&csi->notifier); v4l2_async_notifier_init(&csi->notifier);
......
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