From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from wolverine01.qualcomm.com ([199.106.114.254]:14903 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751449Ab0LPIz0 (ORCPT ); Thu, 16 Dec 2010 03:55:26 -0500 Message-ID: <4D09D3FC.60404@codeaurora.org> Date: Thu, 16 Dec 2010 14:25:24 +0530 From: Pavan Kondeti MIME-Version: 1.0 Subject: Re: [RFC 0/5] USB core changes for supporting OTG on MSM SoC References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-arm-msm-owner@vger.kernel.org List-ID: To: Alan Stern Cc: linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org 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.