The patch number 8511 was added via Jean-Francois Moine <[EMAIL PROTECTED]>
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
        [EMAIL PROTECTED]

------

From: Jean-Francois Moine  <[EMAIL PROTECTED]>
gspca: Get the card name of QUERYCAP from the usb product name.


This is a preliminary for using the driver_info of the struct
usb_device_id to handle the specific per webcam information.

Signed-off-by: Jean-Francois Moine <[EMAIL PROTECTED]>


---

 linux/drivers/media/video/gspca/gspca.c |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff -r f445674ce0d2 -r 0ccd3ffc8b6e linux/drivers/media/video/gspca/gspca.c
--- a/linux/drivers/media/video/gspca/gspca.c   Tue Jul 22 10:35:10 2008 +0200
+++ b/linux/drivers/media/video/gspca/gspca.c   Wed Jul 23 08:24:06 2008 +0200
@@ -841,7 +841,16 @@ static int vidioc_querycap(struct file *
 
        memset(cap, 0, sizeof *cap);
        strncpy(cap->driver, gspca_dev->sd_desc->name, sizeof cap->driver);
-       strncpy(cap->card, gspca_dev->cam.dev_name, sizeof cap->card);
+/*     strncpy(cap->card, gspca_dev->cam.dev_name, sizeof cap->card); */
+       if (gspca_dev->dev->product != NULL) {
+               strncpy(cap->card, gspca_dev->dev->product,
+                       sizeof cap->card);
+       } else {
+               snprintf(cap->card, sizeof cap->card,
+                       "USB Camera (%04x:%04x)",
+                       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);
        cap->version = DRIVER_VERSION_NUMBER;


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/0ccd3ffc8b6e42424e9cb12a96889c7c8d501551

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to