summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx231xx
diff options
context:
space:
mode:
authorPeter Senna Tschudin <peter.senna@gmail.com>2012-06-14 18:58:09 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-06-21 22:05:13 +0200
commitadb609666bbc53ddd12272fdf233fc8148e7bd0e (patch)
tree92b97c0d9fee00d652ff531ae9b1724e7a3d7075 /drivers/media/video/cx231xx
parent[media] [trivial] v4l drivers: typo, change ctruct to struct in comment (diff)
downloadlinux-adb609666bbc53ddd12272fdf233fc8148e7bd0e.tar.xz
linux-adb609666bbc53ddd12272fdf233fc8148e7bd0e.zip
[media] cx231xx: Paranoic stack memory save
Saves 255 bytes of stack memory on cx231xx_usb_probe() by removing a char array. Tested by compilation only. Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx231xx')
-rw-r--r--drivers/media/video/cx231xx/cx231xx-cards.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/drivers/media/video/cx231xx/cx231xx-cards.c b/drivers/media/video/cx231xx/cx231xx-cards.c
index 8ed460d692e0..02d4d36735d3 100644
--- a/drivers/media/video/cx231xx/cx231xx-cards.c
+++ b/drivers/media/video/cx231xx/cx231xx-cards.c
@@ -1023,7 +1023,6 @@ static int cx231xx_usb_probe(struct usb_interface *interface,
int nr = 0, ifnum;
int i, isoc_pipe = 0;
char *speed;
- char descr[255] = "";
struct usb_interface_assoc_descriptor *assoc_desc;
udev = usb_get_dev(interface_to_usbdev(interface));
@@ -1098,20 +1097,10 @@ static int cx231xx_usb_probe(struct usb_interface *interface,
speed = "unknown";
}
- 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));
-
- cx231xx_info("New device %s@ %s Mbps "
+ cx231xx_info("New device %s %s @ %s Mbps "
"(%04x:%04x) with %d interfaces\n",
- descr,
+ udev->manufacturer ? udev->manufacturer : "",
+ udev->product ? udev->product : "",
speed,
le16_to_cpu(udev->descriptor.idVendor),
le16_to_cpu(udev->descriptor.idProduct),