public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] usbvision: use usb_make_path to report bus info
@ 2009-01-20 21:37 Thierry Merle
  2009-01-20 21:39 ` [PATCH 2/5] em28xx: " Thierry Merle
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Thierry Merle @ 2009-01-20 21:37 UTC (permalink / raw)
  To: linux-media

Hello,
Here is the set of patches that makes usb driver use usb_make_path to report bus info (except for pvrusb2 since Mike said he would do the patch)
I would like to have a Acked-by for these patches before doing a pull request, to be sure I did not do weird things.
Thanks
Cheers,
Thierry

usb_make_path reports canonical bus info. Use it when reporting bus info
in VIDIOC_QUERYCAP.

Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
---
diff -r f4d7d0b84940 -r 306881b74bb9 linux/drivers/media/video/usbvision/usbvision-video.c
--- a/linux/drivers/media/video/usbvision/usbvision-video.c	Sun Jan 18 10:55:38 2009 +0000
+++ b/linux/drivers/media/video/usbvision/usbvision-video.c	Tue Jan 20 21:40:44 2009 +0100
@@ -524,8 +524,7 @@
 	strlcpy(vc->card,
 		usbvision_device_data[usbvision->DevModel].ModelString,
 		sizeof(vc->card));
-	strlcpy(vc->bus_info, dev_name(&usbvision->dev->dev),
-		sizeof(vc->bus_info));
+	usb_make_path(usbvision->dev, vc->bus_info, sizeof(vc->bus_info));
 	vc->version = USBVISION_DRIVER_VERSION;
 	vc->capabilities = V4L2_CAP_VIDEO_CAPTURE |
 		V4L2_CAP_AUDIO |

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 2/5] em28xx: use usb_make_path to report bus info
  2009-01-20 21:37 [PATCH 1/5] usbvision: use usb_make_path to report bus info Thierry Merle
@ 2009-01-20 21:39 ` Thierry Merle
  2009-01-20 21:40 ` [PATCH 3/5] gspca: " Thierry Merle
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Thierry Merle @ 2009-01-20 21:39 UTC (permalink / raw)
  To: linux-media


usb_make_path reports canonical bus info. Use it when reporting bus info
in VIDIOC_QUERYCAP.

Signed-off-by: Thierry MERLE <thierry.merle@free.fr>

diff -r 306881b74bb9 -r 6ac9dc705aea linux/drivers/media/video/em28xx/em28xx-video.c
--- a/linux/drivers/media/video/em28xx/em28xx-video.c	Tue Jan 20 21:40:44 2009 +0100
+++ b/linux/drivers/media/video/em28xx/em28xx-video.c	Tue Jan 20 22:01:33 2009 +0100
@@ -1355,7 +1355,7 @@
 
 	strlcpy(cap->driver, "em28xx", sizeof(cap->driver));
 	strlcpy(cap->card, em28xx_boards[dev->model].name, sizeof(cap->card));
-	strlcpy(cap->bus_info, dev_name(&dev->udev->dev), sizeof(cap->bus_info));
+	usb_make_path(dev->udev, cap->bus_info, sizeof(cap->bus_info));
 
 	cap->version = EM28XX_VERSION_CODE;
 
@@ -1543,7 +1543,7 @@
 
 	strlcpy(cap->driver, "em28xx", sizeof(cap->driver));
 	strlcpy(cap->card, em28xx_boards[dev->model].name, sizeof(cap->card));
-	strlcpy(cap->bus_info, dev_name(&dev->udev->dev), sizeof(cap->bus_info));
+	usb_make_path(dev->udev, cap->bus_info, sizeof(cap->bus_info));
 
 	cap->version = EM28XX_VERSION_CODE;
 	cap->capabilities = V4L2_CAP_TUNER;

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 3/5] gspca: use usb_make_path to report bus info
  2009-01-20 21:37 [PATCH 1/5] usbvision: use usb_make_path to report bus info Thierry Merle
  2009-01-20 21:39 ` [PATCH 2/5] em28xx: " Thierry Merle
@ 2009-01-20 21:40 ` Thierry Merle
  2009-01-21 18:34   ` Jean-Francois Moine
  2009-01-20 21:41 ` [PATCH 4/5] uvcvideo: " Thierry Merle
  2009-01-20 21:42 ` [PATCH 5/5] s2255drv: " Thierry Merle
  3 siblings, 1 reply; 7+ messages in thread
From: Thierry Merle @ 2009-01-20 21:40 UTC (permalink / raw)
  To: linux-media

usb_make_path reports canonical bus info. Use it when reporting bus info
in VIDIOC_QUERYCAP.

Signed-off-by: Thierry MERLE <thierry.merle@free.fr>

diff -r 6ac9dc705aea -r 72ba48adaacd linux/drivers/media/video/gspca/gspca.c
--- a/linux/drivers/media/video/gspca/gspca.c	Tue Jan 20 22:01:33 2009 +0100
+++ b/linux/drivers/media/video/gspca/gspca.c	Tue Jan 20 22:06:58 2009 +0100
@@ -977,8 +977,7 @@
 			le16_to_cpu(gspca_dev->dev->descriptor.idVendor),
 			le16_to_cpu(gspca_dev->dev->descriptor.idProduct));
 	}
-	strncpy(cap->bus_info, gspca_dev->dev->bus->bus_name,
-		sizeof cap->bus_info);
+	usb_make_path(gspca_dev->dev, cap->bus_info, sizeof(cap->bus_info));
 	cap->version = DRIVER_VERSION_NUMBER;
 	cap->capabilities = V4L2_CAP_VIDEO_CAPTURE
 			  | V4L2_CAP_STREAMING

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 4/5] uvcvideo: use usb_make_path to report bus info
  2009-01-20 21:37 [PATCH 1/5] usbvision: use usb_make_path to report bus info Thierry Merle
  2009-01-20 21:39 ` [PATCH 2/5] em28xx: " Thierry Merle
  2009-01-20 21:40 ` [PATCH 3/5] gspca: " Thierry Merle
@ 2009-01-20 21:41 ` Thierry Merle
  2009-01-20 22:22   ` Laurent Pinchart
  2009-01-20 21:42 ` [PATCH 5/5] s2255drv: " Thierry Merle
  3 siblings, 1 reply; 7+ messages in thread
From: Thierry Merle @ 2009-01-20 21:41 UTC (permalink / raw)
  To: linux-media

usb_make_path reports canonical bus info. Use it when reporting bus info
in VIDIOC_QUERYCAP.

Signed-off-by: Thierry MERLE <thierry.merle@free.fr>

diff -r 72ba48adaacd -r 43bb285afc52 linux/drivers/media/video/uvc/uvc_v4l2.c
--- a/linux/drivers/media/video/uvc/uvc_v4l2.c	Tue Jan 20 22:06:58 2009 +0100
+++ b/linux/drivers/media/video/uvc/uvc_v4l2.c	Tue Jan 20 22:13:45 2009 +0100
@@ -494,8 +494,7 @@
 		memset(cap, 0, sizeof *cap);
 		strncpy(cap->driver, "uvcvideo", sizeof cap->driver);
 		strncpy(cap->card, vdev->name, 32);
-		strncpy(cap->bus_info, video->dev->udev->bus->bus_name,
-			sizeof cap->bus_info);
+		usb_make_path(video->dev->udev, cap->bus_info, sizeof(cap->bus_info));
 		cap->version = DRIVER_VERSION_NUMBER;
 		if (video->streaming->type == V4L2_BUF_TYPE_VIDEO_CAPTURE)
 			cap->capabilities = V4L2_CAP_VIDEO_CAPTURE

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 5/5] s2255drv: use usb_make_path to report bus info
  2009-01-20 21:37 [PATCH 1/5] usbvision: use usb_make_path to report bus info Thierry Merle
                   ` (2 preceding siblings ...)
  2009-01-20 21:41 ` [PATCH 4/5] uvcvideo: " Thierry Merle
@ 2009-01-20 21:42 ` Thierry Merle
  3 siblings, 0 replies; 7+ messages in thread
From: Thierry Merle @ 2009-01-20 21:42 UTC (permalink / raw)
  To: linux-media

usb_make_path reports canonical bus info. Use it when reporting bus info
in VIDIOC_QUERYCAP.

Signed-off-by: Thierry MERLE <thierry.merle@free.fr>

diff -r 43bb285afc52 -r 6adb3130678d linux/drivers/media/video/s2255drv.c
--- a/linux/drivers/media/video/s2255drv.c	Tue Jan 20 22:13:45 2009 +0100
+++ b/linux/drivers/media/video/s2255drv.c	Tue Jan 20 22:19:25 2009 +0100
@@ -842,8 +842,7 @@
 	struct s2255_dev *dev = fh->dev;
 	strlcpy(cap->driver, "s2255", sizeof(cap->driver));
 	strlcpy(cap->card, "s2255", sizeof(cap->card));
-	strlcpy(cap->bus_info, dev_name(&dev->udev->dev),
-		sizeof(cap->bus_info));
+	usb_make_path(dev->udev, cap->bus_info, sizeof(cap->bus_info));
 	cap->version = S2255_VERSION;
 	cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING;
 	return 0;

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 4/5] uvcvideo: use usb_make_path to report bus info
  2009-01-20 21:41 ` [PATCH 4/5] uvcvideo: " Thierry Merle
@ 2009-01-20 22:22   ` Laurent Pinchart
  0 siblings, 0 replies; 7+ messages in thread
From: Laurent Pinchart @ 2009-01-20 22:22 UTC (permalink / raw)
  To: Thierry Merle; +Cc: linux-media

Hi Thierry,

On Tuesday 20 January 2009, Thierry Merle wrote:
> usb_make_path reports canonical bus info. Use it when reporting bus info
> in VIDIOC_QUERYCAP.
>
> Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
>
> diff -r 72ba48adaacd -r 43bb285afc52
> linux/drivers/media/video/uvc/uvc_v4l2.c ---
> a/linux/drivers/media/video/uvc/uvc_v4l2.c	Tue Jan 20 22:06:58 2009 +0100
> +++ b/linux/drivers/media/video/uvc/uvc_v4l2.c	Tue Jan 20 22:13:45 2009
> +0100 @@ -494,8 +494,7 @@
>  		memset(cap, 0, sizeof *cap);
>  		strncpy(cap->driver, "uvcvideo", sizeof cap->driver);
>  		strncpy(cap->card, vdev->name, 32);
> -		strncpy(cap->bus_info, video->dev->udev->bus->bus_name,
> -			sizeof cap->bus_info);
> +		usb_make_path(video->dev->udev, cap->bus_info, sizeof(cap->bus_info));

This overflows the 80 columns limit, could you please split the statement ?

+		usb_make_path(video->dev->udev, cap->bus_info,
+			      sizeof(cap->bus_info));

>  		cap->version = DRIVER_VERSION_NUMBER;
>  		if (video->streaming->type == V4L2_BUF_TYPE_VIDEO_CAPTURE)
>  			cap->capabilities = V4L2_CAP_VIDEO_CAPTURE

Apart from that,

Acked-by: Laurent Pinchart <laurent.pinchart@skynet.be>

and thanks for the patch.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 3/5] gspca: use usb_make_path to report bus info
  2009-01-20 21:40 ` [PATCH 3/5] gspca: " Thierry Merle
@ 2009-01-21 18:34   ` Jean-Francois Moine
  0 siblings, 0 replies; 7+ messages in thread
From: Jean-Francois Moine @ 2009-01-21 18:34 UTC (permalink / raw)
  To: linux-media

On Tue, 20 Jan 2009 22:40:38 +0100
Thierry Merle <thierry.merle@free.fr> wrote:

> usb_make_path reports canonical bus info. Use it when reporting bus
> info in VIDIOC_QUERYCAP.
> 
> Signed-off-by: Thierry MERLE <thierry.merle@free.fr>

Applied. Thanks.

-- 
Ken ar c'hentañ	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-01-21 18:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-20 21:37 [PATCH 1/5] usbvision: use usb_make_path to report bus info Thierry Merle
2009-01-20 21:39 ` [PATCH 2/5] em28xx: " Thierry Merle
2009-01-20 21:40 ` [PATCH 3/5] gspca: " Thierry Merle
2009-01-21 18:34   ` Jean-Francois Moine
2009-01-20 21:41 ` [PATCH 4/5] uvcvideo: " Thierry Merle
2009-01-20 22:22   ` Laurent Pinchart
2009-01-20 21:42 ` [PATCH 5/5] s2255drv: " Thierry Merle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox