From 0654cbcc8dfbf3bc5e6f93916b67fa57ed826a4b Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Fri, 1 Feb 2019 04:57:31 -0500 Subject: media: uvcvideo: Use usb_make_path to fill in usb_info The uvc driver uses this function to fill in bus_info for VIDIOC_QUERYCAP, so use the same function when filling in the bus_info for the media device. The current implementation only fills in part of the info. E.g. if the full bus_info is usb-0000:01:00.0-1.4.2, then the media bus_info only has 1.4.2. Signed-off-by: Hans Verkuil Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/uvc/uvc_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/media/usb') diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c index 33a22c016456..10cfe8e51626 100644 --- a/drivers/media/usb/uvc/uvc_driver.c +++ b/drivers/media/usb/uvc/uvc_driver.c @@ -2183,7 +2183,7 @@ static int uvc_probe(struct usb_interface *intf, if (udev->serial) strscpy(dev->mdev.serial, udev->serial, sizeof(dev->mdev.serial)); - strscpy(dev->mdev.bus_info, udev->devpath, sizeof(dev->mdev.bus_info)); + usb_make_path(udev, dev->mdev.bus_info, sizeof(dev->mdev.bus_info)); dev->mdev.hw_revision = le16_to_cpu(udev->descriptor.bcdDevice); media_device_init(&dev->mdev); -- cgit v1.2.3