mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 16:37:50 +00:00
media: hantro: Use core-generated bus_info value
The Hantro driver uses a hardcoded value for the bus_info field in the media device and |struct v4l2_capability|. This worked well when there was just one device. However with the iMX.8 series we are now seeing two Hantro blocks on the same chip. The static bus_info is no longer sufficient for differentiating devices. Since commitf2d8b6917f
("media: v4l: ioctl: Set bus_info in v4l_querycap()"), the V4L2 core provides a default value for the bus_info field for platform and PCI devices. This value will match the default value for media devices added by commitcef699749f
("media: mc: Set bus_info in media_device_init()"). These defaults are stable and device-specific. Drop the static bus_info values from the hantro driver and use the defaults. Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Reviewed-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
parent
255a4a5f1d
commit
c9ca3b53ee
2 changed files with 0 additions and 4 deletions
|
@ -1050,8 +1050,6 @@ static int hantro_probe(struct platform_device *pdev)
|
|||
|
||||
vpu->mdev.dev = vpu->dev;
|
||||
strscpy(vpu->mdev.model, DRIVER_NAME, sizeof(vpu->mdev.model));
|
||||
strscpy(vpu->mdev.bus_info, "platform: " DRIVER_NAME,
|
||||
sizeof(vpu->mdev.bus_info));
|
||||
media_device_init(&vpu->mdev);
|
||||
vpu->mdev.ops = &hantro_m2m_media_ops;
|
||||
vpu->v4l2_dev.mdev = &vpu->mdev;
|
||||
|
|
|
@ -142,8 +142,6 @@ static int vidioc_querycap(struct file *file, void *priv,
|
|||
|
||||
strscpy(cap->driver, vpu->dev->driver->name, sizeof(cap->driver));
|
||||
strscpy(cap->card, vdev->name, sizeof(cap->card));
|
||||
snprintf(cap->bus_info, sizeof(cap->bus_info), "platform: %s",
|
||||
vpu->dev->driver->name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue