On 12/16/2010 3:08 AM, Alan Stern wrote: > On Wed, 15 Dec 2010, Pavankumar Kondeti wrote: > >> This patch series adds OTG 2.0 enhancements and misc changes >> required for supporting SRP & HNP in MSM OTG driver. As these >> patches modify the USB core code, I would like to receive >> feedback before posting driver patches. The driver patches are >> available at >> https://www.codeaurora.org/gitweb/quic/la/?p=kernel/msm.git;a=commitdiff;h=05535a995e9eb34c3c41d874d09955a443008cd5 > > All those "#ifdef CONFIG_USB_OTG" lines you are sprinkling throughout > the core are very annoying. A few simple inline routines should allow > you to eliminate many of them. > I am doing OTG specific operations only after checking bus->hnp_support, udev->port == bus->otg_port, which will be true only for OTG device and CONFIG_USB_OTG is enabled. So I guess I can put them directly without #ifdef. > Also, in the 5/5 patch in hub_activate(), all those > > if (hdev->bus->is_b_host && type == HUB_INIT) > > tests are distracting. You can make the test once, at the start of the > function, and store the result in a local variable. > Okay. I will fix this in V2. Thanks, Pavan -- Sent by a consultant of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum. -- 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