Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753379AbbGQBiB (ORCPT ); Thu, 16 Jul 2015 21:38:01 -0400 Received: from mail-bl2on0116.outbound.protection.outlook.com ([65.55.169.116]:52545 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751622AbbGQBh6 (ORCPT ); Thu, 16 Jul 2015 21:37:58 -0400 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=freescale.com; vger.kernel.org; dkim=none (message not signed) header.d=none; Date: Fri, 17 Jul 2015 08:28:38 +0800 From: Peter Chen To: Roger Quadros CC: , , , , , , , , , , Subject: Re: [PATCH v3 04/11] otg-fsm: move usb_bus_start_enum into otg-fsm->ops Message-ID: <20150717002837.GA3609@shlinux2> References: <1436350777-28056-1-git-send-email-rogerq@ti.com> <1436350777-28056-5-git-send-email-rogerq@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1436350777-28056-5-git-send-email-rogerq@ti.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BN1BFFO11FD013;1:jVUEJmDjHTfgEOkNUXgLw81nYU7YnWVwo9YRNY+KXExWlD3EdaFCn3xzdGIlyQmfbTwwPXyFyxIz2XT3qXZYuS6BmAOlAZ4WTALEasInm21uaHU1ieXtB7llWK/PLB8ylMO3S/MuOPJ5x8kfe7Ax/8FTdFZQx6/yLltMPS4O9DN4QPSG3FgyET455TYjNSOqDjN7jRxh/H1EL8Dg5K+yrGC/8RVGYbwqS3d80f95D37K8+VP41cXWPO3Y5LMIf1IhsoDRKl2kkhn/zXgQCY6E5EUh/m/26zpL771deWQlPBIha15/oEBJRky3gYEY5g2KizHAPP0FPbftppfGESl8A3EJbcJ2PWuYsLKKr2m6XAi+Iq4V25JzHcYMWBBOOtOc6/p4S8/xmNHiA0Oq2ulTAoLnJnMFPHf4myKW4VX0KBHEIB7pr+rkreMkX/fl4R2 X-Forefront-Antispam-Report: CIP:192.88.158.2;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(2980300002)(339900001)(199003)(189002)(24454002)(47776003)(19580405001)(33716001)(106466001)(105606002)(46102003)(110136002)(97756001)(83506001)(4001350100001)(189998001)(6806004)(104016003)(54356999)(50466002)(19580395003)(85426001)(46406003)(23726002)(5001960100002)(92566002)(76176999)(87936001)(77096005)(62966003)(33656002)(50986999)(2950100001)(77156002)(86362001);DIR:OUT;SFP:1102;SCL:1;SRVR:CY1PR0301MB1225;H:az84smr01.freescale.net;FPR:;SPF:Fail;MLV:sfv;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;CY1PR0301MB1225;2:V/ViQsCPgK2QXtdHIUHWfFzE8zJQaWTAJiXPXiXXxmJDIgqxRlem0azUXOdAYKG0;3:fZ/tykpBDlHLPv7YmGaXCcKPmpVn8oppoapaSKM+iF/ueFQm8KK2LahWO3/FAxzYDTdXLhnCqw3tw5dlXpo1od5ZqlL8ES602Sg0+HdX02c1wO55q3rKYwufTHNlyB79zO08W717M0oZULgo3NjlU9vftZS/oxQY9rBmFnoc0XW+UPsnZJByRlLIKdUVzkIKdembbItuDBDvXWC1hKppht65YJhjX7Zjn8GiO84Azsg=;25:vehb1VX9oMYwxmX5jzOS1YCgUA/JZxVgjopPCHlz4Pz85gVBj7pV3LJA3bNiGs2c0hwVSKeaVCKEmbFDlB6SHmEz1F2wP2yM/muNKDvwOVnfiRCk8GP7RsE8QThC5g5uAHuTpNKk7QDhhTVWKkQKCQHWo1hec1eu/ukjnnzQx6zK+gy2mYDcZxXN499xkc0viEdAhuOsmAu6M2SyvqjeKWRv1zT5aR3Ny4XQDXszGmU8sNMNzigo2npXhEvNiMJrLbYy3oL4+h73DG/hn+5jIA==;20:GPmU/mBpIG4RdvHWUOsqzHKWmEciJ0M45KXSMq/OLEDWQ45dXBhMKESUOIM4ueUm/NJ1DEUcsiZNzvnPlnAc1bF1TWTzatrNX4xy09bVaQAnM17rkeLhtOmalY5Mc/+7cc1mQ/LrgzUvWhsEqbXBd7+INjNUPYyUhFSY/gxInD8ROu8SNFvM59X9uD65caHp3V1Gxd4avtPivO6cCIiC8DHRPtSptlJ/uNdFCHEnRNRj1Oe1gvar1O0eafmzGMO1XFOeZRfYYNjxwpmb4/WuZx9N24GJUUW4EA6F2vUbJKkjB2d+MagmTT/RZNFIyF4+npi7e94k9dPiUNBdXq1PsB/X3mvtony44O8+8aipdNA= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0301MB1225; CY1PR0301MB1225: X-MS-Exchange-Organization-RulesExecuted X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:CY1PR0301MB1225;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0301MB1225; X-Microsoft-Exchange-Diagnostics: 1;CY1PR0301MB1225;4:DojpRwR+ue1+brbWMkUYYXcVA23bVo9aIjDHuXAzyd2jWEs5VQrWaVMwlK3KcyXSbl3CZ2bq5AMVrjAQVg2liroTYcEY+5KdNY7fnMIOgq43fFaozEOwiuo+bpNItLmHCptI8CRaJ1WNlMefeZzm1XJ+IEgYes+FheBE+I1CPX5QNxnoDBAp5cbph4ozNixSNKbsSjRz53W5qdT2HTWqj/J0sVr8g+5uhmK6nECPdyKUN+20cKHX/Hv96dVa6ucn0CgRl4jMRAsztvgcnp4+2Zowz+nLNEkL6Lb85S20omU= X-Forefront-PRVS: 06400060E1 X-Microsoft-Exchange-Diagnostics: 1;CY1PR0301MB1225;23:v3il+DRBePbu1QzuGLBiC797sm/92yGeNZAYG/3NCUSx8NkfCGQMc+6jMIBBF2G3JOZKUsundIHmBuheLcodnCsofsmqh6WPkOHwJT7edYahnN5rqZ4tAQhi0dJ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KGgCwRxh8LWda2jGAdKkO+YxL6WiEpvGFedz4S2giNFpfntiDhZH52ztc=;20:cYre7hQxBZ1wZfpqdKhzCHNA7eZ3y1SmvBCjg7QIEztk9hi7CKWT6oR9IuOdgN+Gv65xIjGus6sjf62qSjGn0A== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jul 2015 01:37:55.1696 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d;Ip=[192.88.158.2];Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0301MB1225 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2350 Lines: 68 On Wed, Jul 08, 2015 at 01:19:30PM +0300, Roger Quadros wrote: > This is to prevent missing symbol build error if OTG is > enabled (built-in) and HCD core (CONFIG_USB) is module. > > Signed-off-by: Roger Quadros > --- > drivers/usb/common/usb-otg-fsm.c | 6 ++++-- > drivers/usb/phy/phy-fsl-usb.c | 2 ++ > include/linux/usb/otg-fsm.h | 1 + > 3 files changed, 7 insertions(+), 2 deletions(-) > > diff --git a/drivers/usb/common/usb-otg-fsm.c b/drivers/usb/common/usb-otg-fsm.c > index 1873eb3..156fd25 100644 > --- a/drivers/usb/common/usb-otg-fsm.c > +++ b/drivers/usb/common/usb-otg-fsm.c > @@ -166,8 +166,10 @@ static int otg_set_state(struct otg_fsm *fsm, enum usb_otg_state new_state) > otg_loc_conn(fsm, 0); > otg_loc_sof(fsm, 1); > otg_set_protocol(fsm, PROTO_HOST); > - usb_bus_start_enum(fsm->otg->host, > - fsm->otg->host->otg_port); > + if (fsm->ops->start_enum) { > + fsm->ops->start_enum(fsm->otg->host, > + fsm->otg->host->otg_port); > + } > break; > case OTG_STATE_A_IDLE: > otg_drv_vbus(fsm, 0); > diff --git a/drivers/usb/phy/phy-fsl-usb.c b/drivers/usb/phy/phy-fsl-usb.c > index ee3f2c2..19541ed 100644 > --- a/drivers/usb/phy/phy-fsl-usb.c > +++ b/drivers/usb/phy/phy-fsl-usb.c > @@ -783,6 +783,8 @@ static struct otg_fsm_ops fsl_otg_ops = { > > .start_host = fsl_otg_start_host, > .start_gadget = fsl_otg_start_gadget, > + > + .start_enum = usb_bus_start_enum, > }; > > /* Initialize the global variable fsl_otg_dev and request IRQ for OTG */ > diff --git a/include/linux/usb/otg-fsm.h b/include/linux/usb/otg-fsm.h > index c631dde..22d8baa 100644 > --- a/include/linux/usb/otg-fsm.h > +++ b/include/linux/usb/otg-fsm.h > @@ -198,6 +198,7 @@ struct otg_fsm_ops { > void (*del_timer)(struct otg_fsm *fsm, enum otg_fsm_timer timer); > int (*start_host)(struct otg_fsm *fsm, int on); > int (*start_gadget)(struct otg_fsm *fsm, int on); > + int (*start_enum)(struct usb_bus *bus, unsigned port_num); > }; > > > -- > 2.1.4 > Acked-by: Peter Chen -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/