Re: [PATCH 06/11] [media] v4l2-mc: use usb_make_path() to provide bus info

Hans Verkuil
2016-02-12T09:55:49Z

On 02/12/2016 10:45 AM, Mauro Carvalho Chehab wrote:
> Report the bus info on the same way as VIDIOC_QUERYCAP. Also,
> currently, it is reporting just PORT/DEV.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
> ---
> drivers/media/v4l2-core/v4l2-mc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/v4l2-core/v4l2-mc.c b/drivers/media/v4l2-core/v4l2-mc.c
> index 649972e87621..ab5e42a86cc5 100644
> --- a/drivers/media/v4l2-core/v4l2-mc.c
> +++ b/drivers/media/v4l2-core/v4l2-mc.c
> @@ -79,7 +79,7 @@ struct media_device * __v4l2_mc_usb_media_device_init(struct usb_device *udev,
> strlcpy(mdev->model, "unknown model", sizeof(mdev->model));
> if (udev->serial)
> strlcpy(mdev->serial, udev->serial, sizeof(mdev->serial));
> - strcpy(mdev->bus_info, udev->devpath);
> + usb_make_path(udev, mdev->bus_info, sizeof(mdev->bus_info));
> mdev->hw_revision = le16_to_cpu(udev->descriptor.bcdDevice);
> mdev->driver_version = LINUX_VERSION_CODE;
>
>

Please fold this in patch 02/11 and you can disregard my comment about
strcpy vs strlcpy.

Regards,

Hans