diff options
author | Peter Senna Tschudin <peter.senna@gmail.com> | 2012-06-14 12:58:09 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-06-21 16:05:13 -0400 |
commit | adb609666bbc53ddd12272fdf233fc8148e7bd0e (patch) | |
tree | 92b97c0d9fee00d652ff531ae9b1724e7a3d7075 /drivers/media/video/cx231xx/cx231xx-cards.c | |
parent | 22cf83fa438e2f793a941b86f40281768ef53fc0 (diff) |
[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/cx231xx-cards.c')
-rw-r--r-- | drivers/media/video/cx231xx/cx231xx-cards.c | 17 |
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, | |||
1023 | int nr = 0, ifnum; | 1023 | int nr = 0, ifnum; |
1024 | int i, isoc_pipe = 0; | 1024 | int i, isoc_pipe = 0; |
1025 | char *speed; | 1025 | char *speed; |
1026 | char descr[255] = ""; | ||
1027 | struct usb_interface_assoc_descriptor *assoc_desc; | 1026 | struct usb_interface_assoc_descriptor *assoc_desc; |
1028 | 1027 | ||
1029 | udev = usb_get_dev(interface_to_usbdev(interface)); | 1028 | udev = usb_get_dev(interface_to_usbdev(interface)); |
@@ -1098,20 +1097,10 @@ static int cx231xx_usb_probe(struct usb_interface *interface, | |||
1098 | speed = "unknown"; | 1097 | speed = "unknown"; |
1099 | } | 1098 | } |
1100 | 1099 | ||
1101 | if (udev->manufacturer) | 1100 | cx231xx_info("New device %s %s @ %s Mbps " |
1102 | strlcpy(descr, udev->manufacturer, sizeof(descr)); | ||
1103 | |||
1104 | if (udev->product) { | ||
1105 | if (*descr) | ||
1106 | strlcat(descr, " ", sizeof(descr)); | ||
1107 | strlcat(descr, udev->product, sizeof(descr)); | ||
1108 | } | ||
1109 | if (*descr) | ||
1110 | strlcat(descr, " ", sizeof(descr)); | ||
1111 | |||
1112 | cx231xx_info("New device %s@ %s Mbps " | ||
1113 | "(%04x:%04x) with %d interfaces\n", | 1101 | "(%04x:%04x) with %d interfaces\n", |
1114 | descr, | 1102 | udev->manufacturer ? udev->manufacturer : "", |
1103 | udev->product ? udev->product : "", | ||
1115 | speed, | 1104 | speed, |
1116 | le16_to_cpu(udev->descriptor.idVendor), | 1105 | le16_to_cpu(udev->descriptor.idVendor), |
1117 | le16_to_cpu(udev->descriptor.idProduct), | 1106 | le16_to_cpu(udev->descriptor.idProduct), |