Skip to contentSkip to conversation

usb: mv-otg - Fix build if CONFIG_USB is not set

PATCH In review Geert Uytterhoeven 2 participants 2 messages Jan 15, 2012 – Jan 16, 2012 USB

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: mv-otg - Fix build if CONFIG_USB is not set

ERROR: "usb_remove_hcd" [drivers/usb/otg/mv_otg.ko] undefined!
ERROR: "usb_add_hcd" [drivers/usb/otg/mv_otg.ko] undefined!

--
Inpired by drivers/usb/otg/msm_otg.c. Is this correct?

 drivers/usb/otg/mv_otg.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/usb/otg/mv_otg.c +2 -0
index db0d4fc..b5fbe14 100644
@@ -202,6 +202,7 @@ static void mv_otg_init_irq(struct mv_otg *mvotg)
 
 static void mv_otg_start_host(struct mv_otg *mvotg, int on)
 {
+#ifdef CONFIG_USB
 	struct otg_transceiver *otg = &mvotg->otg;
 	struct usb_hcd *hcd;
 
@@ -216,6 +217,7 @@ static void mv_otg_start_host(struct mv_otg *mvotg, int on)
 		usb_add_hcd(hcd, hcd->irq, IRQF_SHARED);
 	else
 		usb_remove_hcd(hcd);
+#endif /* CONFIG_USB */
 }
 
 static void mv_otg_start_periphrals(struct mv_otg *mvotg, int on)
Signature · 1 line
1.7.0.4
#1 lore raw

Hi Geert,

Quoted 38 lines

-----Original Message-----
From: Geert Uytterhoeven [mailto:[email protected]]
Sent: 2012年1月15日 19:36
To: Neil Zhang; Chao Xie; Felipe Balbi
Cc: Randy Dunlap; [email protected]; linux- [email protected]; Geert Uytterhoeven
Subject: [PATCH] usb: mv-otg - Fix build if CONFIG_USB is not set

ERROR: "usb_remove_hcd" [drivers/usb/otg/mv_otg.ko] undefined!
ERROR: "usb_add_hcd" [drivers/usb/otg/mv_otg.ko] undefined!

--
Inpired by drivers/usb/otg/msm_otg.c. Is this correct?

 drivers/usb/otg/mv_otg.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/usb/otg/mv_otg.c +2 -0
index db0d4fc..b5fbe14 100644
@@ -202,6 +202,7 @@ static void mv_otg_init_irq(struct mv_otg *mvotg)
 
 static void mv_otg_start_host(struct mv_otg *mvotg, int on)
 {
+#ifdef CONFIG_USB
 	struct otg_transceiver *otg = &mvotg->otg;
 	struct usb_hcd *hcd;
 
@@ -216,6 +217,7 @@ static void mv_otg_start_host(struct mv_otg *mvotg,
 int on)
 		usb_add_hcd(hcd, hcd->irq, IRQF_SHARED);
 	else
 		usb_remove_hcd(hcd);
+#endif /* CONFIG_USB */
 }
 
Quoted 3 lines

static void mv_otg_start_periphrals(struct mv_otg *mvotg, int on)
--
1.7.0.4

Thanks for your information.
I think it would be better to add a dependency on USB_EHCI_MV since there is no need to use the OTG driver without enable host.

Best Regards,
Neil Zhang �翳簕.n�+壏煯壄�+%娝�遍荻w�簕.n�+壏{炳G珴�妠ay�蕠跈�,jf"穐殢飦�戧鐉_璁(殠娸"濟�m���G珴�⒏?櫒璀�&x忈秈O曟瑉窔v豝�m��� �鹅�⒏?朓�