Skip to contentSkip to conversation

USB: core: Add input prompt and help text for USB_OTG config

PATCH New Pavankumar Kondeti 1 participant 2 messages Dec 16, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 USB: core: Add input prompt and help text for USB_OTG config

bd6882 commit (usb: gadget: fix Kconfig warning) removes the duplicate USB_OTG config from gadget/Kconfig. But does not copy the input prompt and help text to the original config defined in core/Kconfig. Add them now.

---
 drivers/usb/core/Kconfig |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
drivers/usb/core/Kconfig +10 -2
index 9eed5b5..bcc2477 100644
@@ -107,11 +107,19 @@ config USB_SUSPEND
 	  If you are unsure about this, say N here.
 
 config USB_OTG
-	bool
+	bool "OTG support"
 	depends on USB && EXPERIMENTAL
 	depends on USB_SUSPEND
 	default n
-
+	help
+	  The most notable feature of USB OTG is support for a
+	  "Dual-Role" device, which can act as either a device
+	  or a host. The initial role is decided by the type of
+	  plug inserted and can be changed later when two dual
+	  role devices talk to each other.
+
+	  Select this only if your board has Mini-AB/Micro-AB
+	  connector.
 
 config USB_OTG_WHITELIST
 	bool "Rely on OTG Targeted Peripherals List"
Signature · 5 lines
1.7.1

--
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
#1 lore raw

PATCH 1/1 USB: gadget: Remove suspended sysfs file before freeing cdev

cdev struct is accessed in suspended sysfs show function. So remove sysfs file before freeing the cdev in composite_unbind.

---
 drivers/usb/gadget/composite.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/usb/gadget/composite.c +1 -1
index 21dc0da..77cabcb 100644
@@ -1047,9 +1047,9 @@ composite_unbind(struct usb_gadget *gadget)
 		kfree(cdev->req->buf);
 		usb_ep_free_request(gadget->ep0, cdev->req);
 	}
+	device_remove_file(&gadget->dev, &dev_attr_suspended);
 	kfree(cdev);
 	set_gadget_data(gadget, NULL);
-	device_remove_file(&gadget->dev, &dev_attr_suspended);
 	composite = NULL;
 }
 
Signature · 5 lines
1.7.1

--
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.