mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] usb: mv-otg - Fix build if CONFIG_USB is not set
@ 2012-01-15 11:36 Geert Uytterhoeven
  2012-01-16  2:28 ` Neil Zhang
  0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2012-01-15 11:36 UTC (permalink / raw)
  To: Neil Zhang, Chao Xie, Felipe Balbi
  Cc: Randy Dunlap, linux-usb, linux-kernel, Geert Uytterhoeven

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

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
--
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(-)

diff --git a/drivers/usb/otg/mv_otg.c b/drivers/usb/otg/mv_otg.c
index db0d4fc..b5fbe14 100644
--- a/drivers/usb/otg/mv_otg.c
+++ b/drivers/usb/otg/mv_otg.c
@@ -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)
-- 
1.7.0.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: [PATCH] usb: mv-otg - Fix build if CONFIG_USB is not set
  2012-01-15 11:36 [PATCH] usb: mv-otg - Fix build if CONFIG_USB is not set Geert Uytterhoeven
@ 2012-01-16  2:28 ` Neil Zhang
  0 siblings, 0 replies; 2+ messages in thread
From: Neil Zhang @ 2012-01-16  2:28 UTC (permalink / raw)
  To: Geert Uytterhoeven, Chao Xie, Felipe Balbi
  Cc: Randy Dunlap, linux-usb, linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb2312", Size: 1715 bytes --]

Hi Geert,

> -----Original Message-----
> From: Geert Uytterhoeven [mailto:geert@linux-m68k.org]
> Sent: 2012Äê1ÔÂ15ÈÕ 19:36
> To: Neil Zhang; Chao Xie; Felipe Balbi
> Cc: Randy Dunlap; linux-usb@vger.kernel.org; linux-
> kernel@vger.kernel.org; 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!
> 
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> --
> 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(-)
> 
> diff --git a/drivers/usb/otg/mv_otg.c b/drivers/usb/otg/mv_otg.c
> index db0d4fc..b5fbe14 100644
> --- a/drivers/usb/otg/mv_otg.c
> +++ b/drivers/usb/otg/mv_otg.c
> @@ -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)
> --
> 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Ç+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-01-16  2:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-15 11:36 [PATCH] usb: mv-otg - Fix build if CONFIG_USB is not set Geert Uytterhoeven
2012-01-16  2:28 ` Neil Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®