提交 c6edaf16 编写于 作者: J Jean-Francois Moine 提交者: Mauro Carvalho Chehab

V4L/DVB (8511): 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: NJean-Francois Moine <moinejf@free.fr>
Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
上级 353facd4
...@@ -834,7 +834,16 @@ static int vidioc_querycap(struct file *file, void *priv, ...@@ -834,7 +834,16 @@ static int vidioc_querycap(struct file *file, void *priv,
memset(cap, 0, sizeof *cap); memset(cap, 0, sizeof *cap);
strncpy(cap->driver, gspca_dev->sd_desc->name, sizeof cap->driver); 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, strncpy(cap->bus_info, gspca_dev->dev->bus->bus_name,
sizeof cap->bus_info); sizeof cap->bus_info);
cap->version = DRIVER_VERSION_NUMBER; cap->version = DRIVER_VERSION_NUMBER;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册