Hi, On Fri, May 10, 2013 at 8:35 PM, Vivek Gautam <gautamvivek1987@xxxxxxxxx> wrote: > Hi Felipe, > > > On Thu, May 9, 2013 at 8:18 PM, Felipe Balbi <balbi@xxxxxx> wrote: >> Hi, >> >> On Wed, May 08, 2013 at 10:04:56PM +0530, Vivek Gautam wrote: >>> Commit 388e5c51135f817f01177c42261f1116a6d7f2ad usb: dwc3: remove >>> dwc3 dependency on host AND gadget >>> by me breaks compilation when USB_DWC3=y, USB=y but USB_GADGET=m, >>> additionally when either of USB_DWC3_GADGET=y or USB_DWC3_DUAL_ROLE=y >>> :-( >>> >>> I had some confusion with this actually. >>> >>> We started with making USB_DWC3 independent of USB and USB_GADGET. >>> Thereby added some helping configs USB_DWC3_HOST, USB_DWC3_GADGET and >>> USB_DWC3_DUAL_ROLE. >>> Now when USB_GADGET=m and USB=y; USB_DWC3=y >>> Now, USB_DWC3_DUAL_ROLE=y or USB_DWC3_GADGET=y will make things >>> worse, since it will compile >>> dwc3/gadget.c and dwc3/ep0.c >>> This lets the compilation to break since usb/gadget/** is still >>> compiling as module. >>> But the errors it throws for functions are already exported with >>> EXPORT_SYMBOL_GPL(), then why these errors then. >>> >>> A possible flaw with this could be that "USB_DWC3_HOST, >>> USB_DWC3_GADGET and USB_DWC3_DUAL_ROLE" >>> are still 'bool' type configs. But making this as 'tristate' too >>> doesn't makes our life easier. >>> Ideally dwc3/gadget.c and dwc3/ep0.c should be compiling as modules >>> when USB_GADGET=m. >>> But then we have functions like dwc3_host_init() and >>> dwc3_gadget_init() and other similar functions in dwc3/core.c which >>> give >>> compilation break. >>> >>> Help please !!!! :-) >> >> I guess we need to make USB_GADGET bool then. udc-core would always be >> built-in or not built at all. Can you see if that helps ? > > True, this definitely helps. Thanks !! > But i was worrying do we really want to do this :-( > > I could come with below change too (although seems a bit silly, adding > a dummy config and stuff :-( ) Sorry for such a bad solution here. This definitely is not the right way. I could use Peter's suggestion to get to a solution. My following mail will contain a patch to that. -- Best Regards Vivek -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html