Skip to contentSkip to conversation

usb_otg: compile fix

PATCH In review Francisco Alecrim 5 participants 6 messages Jan 8, 2010 – Jan 11, 2010 1 message not in the archive USB

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 usb_otg: compile fix

From: Francisco Alecrim <[email protected]>

include/linux/usb.h: In function 'usb_mark_last_busy':
include/linux/usb.h:561: error: 'struct usb_device' has no member named 'last_busy'

Option USB_OTG selects USB_SUSPEND but doesn't select PM(required by USB_SUSPEND) causing this compile error. Putting USB_SUSPEND as USB_OTG depend ensure that PM is selected.

---
 drivers/usb/core/Kconfig   |    1 -
 drivers/usb/gadget/Kconfig |    2 +-
 2 files changed, 1 insertions(+), 2 deletions(-)
drivers/usb/core/Kconfig +0 -1
index ad92594..4c7d6e8 100644
@@ -109,7 +109,6 @@ config USB_SUSPEND
 config USB_OTG
 	bool
 	depends on USB && EXPERIMENTAL
-	select USB_SUSPEND
 	default n
 
 
drivers/usb/gadget/Kconfig +1 -1
index ee41120..af819fe 100644
@@ -211,7 +211,7 @@ config USB_OMAP
 
 config USB_OTG
 	boolean "OTG Support"
-	depends on USB_GADGET_OMAP && ARCH_OMAP_OTG && USB_OHCI_HCD
+	depends on USB_GADGET_OMAP && ARCH_OMAP_OTG && USB_OHCI_HCD && USB_SUSPEND
 	help
 	   The most notable feature of USB OTG is support for a
 	   "Dual-Role" device, which can act as either a device
Signature · 1 line
1.6.3.3

A message that is not in the archive (sent off-list or not yet received): 1262912592-7817-1-git-send-email-alecrim-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#2 lore raw

PATCH 2/2 fix compile for tahvo-usb.c

From: Francisco Alecrim <[email protected]>

drivers/cbus/tahvo-usb.c:138: undefined reference to 'usb_bus_start_enum'

usb_bus_start_enum only exported if USB_OTG enabled

---
 drivers/cbus/tahvo-usb.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/cbus/tahvo-usb.c +2 -0
index 9f8bbcc..762671a 100644
@@ -132,12 +132,14 @@ static irqreturn_t omap_otg_irq(int irq, void *arg)
 	} else if (otg_irq & A_VBUS_ERR) {
 		omap_writew(A_VBUS_ERR, OTG_IRQ_SRC);
 	} else if (otg_irq & DRIVER_SWITCH) {
+#ifdef CONFIG_USB_OTG
 		if ((!(omap_readl(OTG_CTRL) & OTG_DRIVER_SEL)) &&
 		   tu->otg.host && tu->otg.state == OTG_STATE_A_HOST) {
 			/* role is host */
 			usb_bus_start_enum(tu->otg.host,
 					   tu->otg.host->otg_port);
 		}
+#endif
 		omap_writew(DRIVER_SWITCH, OTG_IRQ_SRC);
 	} else
 		return IRQ_NONE;
Signature · 6 lines
1.6.3.3

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#4 lore raw
In reply to a message not in the archive
Quoted 11 lines · Francisco Alecrim

From: Francisco Alecrim <[email protected]>

include/linux/usb.h: In function 'usb_mark_last_busy':
include/linux/usb.h:561: error: 'struct usb_device' has no member named 'last_busy'

Option USB_OTG selects USB_SUSPEND but doesn't select PM(required by USB_SUSPEND) causing this compile error. Putting USB_SUSPEND as USB_OTG depend ensure that PM is selected.

should go to linux-usb@vger

Signature · 5 lines
balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#5 lore raw

Hi,

Quoted 7 lines · Felipe Balbi
Quoted 6 lines · Francisco Alecrim

From: Francisco Alecrim <[email protected]>

include/linux/usb.h: In function 'usb_mark_last_busy':
include/linux/usb.h:561: error: 'struct usb_device' has no member named 'last_busy'

Quoted 7 lines
Quoted 5 lines

Option USB_OTG selects USB_SUSPEND but doesn't select PM(required by USB_SUSPEND) causing this compile error. Putting USB_SUSPEND as USB_OTG depend ensure that PM is selected.

should go to linux-usb@vger

my bad, it's already in Cc.

Signature · 5 lines
balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#6 lore raw
In reply to Francisco Alecrim
Quoted 9 lines · Francisco Alecrim

From: Francisco Alecrim <[email protected]>

include/linux/usb.h: In function 'usb_mark_last_busy':
include/linux/usb.h:561: error: 'struct usb_device' has no member named 'last_busy'

Option USB_OTG selects USB_SUSPEND but doesn't select PM(required by USB_SUSPEND) causing this compile error. Putting USB_SUSPEND as USB_OTG depend ensure that PM is selected.

For me it seems sufficient to just remove the select of USB_SUSPEND. USB_OTG compiles fine without it.

Seems harsh to require someone to enable CONFIG_PM and USB_SUSPEND just to compile OTG drivers.

-Olof