lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 12 Apr 2011 21:34:55 +0200
From:	Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To:	Tatyana Brokhman <tlinder@...eaurora.org>
Cc:	gregkh@...e.de, linux-arm-msm@...r.kernel.org, balbi@...com,
	ablay@...eaurora.org, linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Subject: [PATCH 4/5] usb/gadget: don't deploy SS descriptors if SS is not enabled.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
---
 drivers/usb/gadget/composite.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index 92cc238..ac30e2f 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -74,10 +74,12 @@ MODULE_PARM_DESC(iSerialNumber, "SerialNumber string");
 static char composite_manufacturer[50];
 
 /* Default endpoint companion descriptor */
+#ifdef CONFIG_USB_GADGET_SUPERSPEED
 static struct usb_ss_ep_comp_descriptor default_ep_comp_desc = {
 		.bDescriptorType = USB_DT_SS_ENDPOINT_COMP,
 		.bLength = sizeof(struct usb_ss_ep_comp_descriptor),
 };
+#endif
 
 /**
  * usb_create_ss_descriptors() - Generate SuperSpeed descriptors
@@ -93,6 +95,7 @@ static struct usb_ss_ep_comp_descriptor default_ep_comp_desc = {
  */
 void usb_create_ss_descriptors(struct usb_function *f)
 {
+#ifdef CONFIG_USB_GADGET_SUPERSPEED
 	struct usb_ss_ep_comp_descriptor	*ep_comp_desc;
 	struct usb_endpoint_descriptor		*ep_desc;
 	struct usb_descriptor_header		**src = f->hs_descriptors;
@@ -185,6 +188,7 @@ void usb_create_ss_descriptors(struct usb_function *f)
 	 */
 	*tmp = NULL;
 	f->ss_desc_allocated = true;
+#endif
 }
 
 /*-------------------------------------------------------------------------*/
-- 
1.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ