summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx/em28xx-video.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2008-11-28 23:46:43 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-29 17:53:43 -0200
commit8c2399895dc1b5e8976884d4898e68e61ec23e54 (patch)
tree5b8bbf752ea82aa4260912a7c89f4fff55239efc /drivers/media/video/em28xx/em28xx-video.c
parent6a18eaf61aadcd7f002ddfa26031525570e6f8b6 (diff)
downloadop-kernel-dev-8c2399895dc1b5e8976884d4898e68e61ec23e54.zip
op-kernel-dev-8c2399895dc1b5e8976884d4898e68e61ec23e54.tar.gz
V4L/DVB (9767): em28xx: improve board description messages
Print manufacturer/product info from USB device and also card entry. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-video.c')
-rw-r--r--drivers/media/video/em28xx/em28xx-video.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c
index a0db340..32b437f 100644
--- a/drivers/media/video/em28xx/em28xx-video.c
+++ b/drivers/media/video/em28xx/em28xx-video.c
@@ -2177,6 +2177,7 @@ static int em28xx_usb_probe(struct usb_interface *interface,
int retval = -ENODEV;
int i, nr, ifnum, isoc_pipe;
char *speed;
+ char descr[255] = "";
udev = usb_get_dev(interface_to_usbdev(interface));
ifnum = interface->altsetting[0].desc.bInterfaceNumber;
@@ -2249,8 +2250,20 @@ static int em28xx_usb_probe(struct usb_interface *interface,
speed = "unknown";
}
- printk(DRIVER_NAME ": New video device @ %s Mbps "
+ if (udev->manufacturer)
+ strlcpy(descr, udev->manufacturer, sizeof(descr));
+
+ if (udev->product) {
+ if (*descr)
+ strlcat(descr, " ", sizeof(descr));
+ strlcat(descr, udev->product, sizeof(descr));
+ }
+ if (*descr)
+ strlcat(descr, " ", sizeof(descr));
+
+ printk(DRIVER_NAME ": New device %s@ %s Mbps "
"(%04x:%04x, interface %d, class %d)\n",
+ descr,
speed,
le16_to_cpu(udev->descriptor.idVendor),
le16_to_cpu(udev->descriptor.idProduct),
OpenPOWER on IntegriCloud