Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754406AbbHGDWO (ORCPT ); Thu, 6 Aug 2015 23:22:14 -0400 Received: from mail-by2on0103.outbound.protection.outlook.com ([207.46.100.103]:61894 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752003AbbHGDWM (ORCPT ); Thu, 6 Aug 2015 23:22:12 -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, 7 Aug 2015 10:11:47 +0800 From: Peter Chen To: Tomeu Vizoso CC: , Greg Kroah-Hartman , Subject: Re: [PATCH] usb: chipidea: imx: properly check for usbmisc Message-ID: <20150807021145.GA13200@shlinux2> References: <1438866594-5875-1-git-send-email-tomeu.vizoso@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1438866594-5875-1-git-send-email-tomeu.vizoso@collabora.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11OLC002;1:eMFfRdF9eDymYxJ3rWpTGU6lsFzFlmJvAvVgMtOrA8wDSwgJel1xGGKGHGTTE6FpL45hW9Z8UcgReQOh8jbi/WiPoIBJ1r5qWklQRr+AiJa2f+MaSB11+c2GbJ/iFrwojGPmfM8ILxarekLADYD4gZ7djRvFkZ3lFf7C6hSNfybxi1/O99X0PVG6jYtUnERAVTPYpTLm20luZ23yvAGVLd1P9VLg2s4dU7NwPhRyA3T4SJTVgCGEzvfdT8WY9hZzk14UCzlEam+1L/iek7uh5ZcdgeKnAgDztDkrwXovNu7GA5Gd1Snn3hK0x0ioYuh2 X-Forefront-Antispam-Report: CIP:192.88.158.2;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(2980300002)(339900001)(189002)(199003)(24454002)(6806004)(69596002)(19580405001)(19580395003)(189998001)(33716001)(86362001)(2950100001)(97756001)(83506001)(106466001)(105606002)(92566002)(87936001)(85426001)(76176999)(54356999)(62966003)(50986999)(77156002)(46102003)(104016003)(81156007)(77096005)(97736004)(50466002)(5001860100001)(33656002)(4001540100001)(68736005)(4001350100001)(23726002)(5001960100002)(110136002)(5001830100001)(46406003)(64706001)(47776003);DIR:OUT;SFP:1102;SCL:1;SRVR:BLUPR03MB486;H:az84smr01.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BLUPR03MB486;2:Pw51FGctd7o4EQKgSop0fRlsHNk1g0Rq6N6UsIWRqBF+EKOGEXFJyh9q2DaGsMG/LaGhFHFFPSnq7NsESLx8hmyy5Tf8GgZaYksAKIKTk+490R22VoILZvnyQCYlpQg4HHRhtc731Vh0Kv6pT06P090kO3nSgF5TY6qhiSRid6k=;3:u0iHSBc8jgUXtCd8PXK0cEtruEz98YMwPfl1nT2EaeWObbRA5kA/DmbKi6vUEglAeFkyz7DgHiOJ34NlR70eyastallXKi6w6UCtjWpbGv6WX+E0wUCsZwmqIoB6P3oNryY+8H9I2MS24xDbpqZnw5RRdJ3yD/naNHxEVkCozk37Sd3FeR9frw/ExOPefpHd7pDkVFtrnaLPDpETtiRUtFO+vtjwi4F3MuD0CcSriVU=;25:2UdqetJT6d7jVVy56WDu9Hgg4aFg+R8Y0GsWoITyLPsFzkw660yAvxoi56JbWvP75uD1dc5MHX66fSD3b3f6RrNy7bs26f5ORgza3A5jChx4VwJR1/DQbtquW9igKd8KhmxVpLA9VfLIUuQQTqwEluDlDkI615kvEBZonpPsGDsaobqxQkboiG85l3OSJt83cEMi8IZoG4t2Hus/WnZBtMhnYtKN8kr/kLGmyRT/fLhxKjanBUt47hAEoEHis/sn X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR03MB486; X-Microsoft-Exchange-Diagnostics: 1;BLUPR03MB486;20:GCwqHcOa7mP7SAPeai07SAcpZCrfIvjPzUjcWWyLBpOOfc5ANSeJMfu16y56G0H02vr+F2EiW0p6FLgeUMG+N/Bn7RJSjT06cDeuE5H3dOuS8RGwJKXCF3lAE6XCKhZlk40BMw0PFRcX/8s4q8KeRM55jXovzWz6l/CkcmHRqN8ZXcp+p4TJ+8C8dNpJtL6NcUMt85DB4KdmXD2nD32QFpcXjcSIzfhPZ97W8fy7WZuuj7745NRBcynFKAuo2gmCmVPGpLW6or9IlEGVy0rP/c0qH7hiVTn5NST5XsBTO6C17b3JVhZNdfuEFELo5Z7jDeebh/rshYcdMLnnvw7+lz2X6mq3GGHBydnBeF4nJ10=;4:c/pVowhsDPr51lOCMTLzm1/aMEr1UhDgcwuWoiGfT/9gjGMBp3bFMIsUShYZhKfXzRChKgzJoF3HqHi1adbKbWubdN3GqE/he1XDA/C+NsvKB2UpmDMPltvLddzxi7KCh/rvtNyXNc1nHFPEBCaXUKNsz3eZMIBkF40WwJ7OOBjYCkqypiTWjIYIbYD1kMUIqxLOxo103xWOSPjw6iYgY2swXmK1dBqUit+eVKwuCgnWRbGZfzfOaz/PA18F6ixzWIgjmlUI6ecCeK6n8eBWBf8GZsM/GqB1qMRYB6u/zL8= 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:BLUPR03MB486;BCL:0;PCL:0;RULEID:;SRVR:BLUPR03MB486; X-Forefront-PRVS: 066153096A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BLUPR03MB486;23:tM13yI1xpbd/+20f+NB83akAVtw+SkJKsOMGsx34yy?= =?us-ascii?Q?O3TObyE8qrHWzFm8aEbBlH3gAh+81GVvPreWfs9SS8po6MNTdWVuS/SIfsAe?= =?us-ascii?Q?fWev0MSB2BTwy6Y1z42EATPi84PopDoPXpcOwTGj83WFWImZ3gfBhopy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5jLi53FrrXZHuY7x8ns+1/gGPNXoox2Fix73f?= =?us-ascii?Q?M2/KTtlnAkDz/DTdv0N4ILUwhNSDHg1j43nYI1d7uxsYM0/e8fgZtcZptcZD?= =?us-ascii?Q?OFCcY4S0bct1z5wy44K+Vu5WjPDjSAacNUK9u4rmZtrZ/GlGWIkF6ol5OZB1?= =?us-ascii?Q?KgNK9i0SOjJN8=3D?= X-Microsoft-Exchange-Diagnostics: 1;BLUPR03MB486;5:6bJGTwTFVRE7zutNZW1CvGLxZRnTi55J8xpPtnp814YePWu8+s5okGJFXemi7Lz0XAXiXCe0WAZGbmNe1xMXOKtcFnKKFJPz9r5YuW3DABlud5HX0umJsV8mGbhfq5KqpUC/S849j2f/dRpci/Blng==;24:iWhjn4Ns6W4bqWv5KArcYO/sgkbR+crOXZlA5iGQ1OV7dF8dNws10ThDp8sIAgEqTKp+Qd6v3lgfldbMCbe/CvTUaTl8SqIS3dIFdi0A6kY=;20:pp8+ghq8RAelhDHziqLAo18h0IHFdxY3Mv4c8h7afTqhW0VEbwKXa3aN+Xu+IdhRs67/vIsKU/DzZFqA8kQIFg== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Aug 2015 03:22:09.9497 (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: BLUPR03MB486 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1492 Lines: 45 On Thu, Aug 06, 2015 at 03:09:54PM +0200, Tomeu Vizoso wrote: > If usbmisc hasn't probed yet, defer the probe. > > It's not enough to check if the platform device for the OF node of the > usbmisc has been registered, but it also needs to have been probed > already before we can call imx_usbmisc_init(). > > This can happen if the order in which devices are probed change due to > async probing or on-demand probing of dependencies. > > Signed-off-by: Tomeu Vizoso > --- > drivers/usb/chipidea/ci_hdrc_imx.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c > index 504554e41922..e3c61d5e9270 100644 > --- a/drivers/usb/chipidea/ci_hdrc_imx.c > +++ b/drivers/usb/chipidea/ci_hdrc_imx.c > @@ -104,7 +104,7 @@ static struct imx_usbmisc_data *usbmisc_get_init_data(struct device *dev) > misc_pdev = of_find_device_by_node(args.np); > of_node_put(args.np); > > - if (!misc_pdev) > + if (!misc_pdev || !platform_get_drvdata(misc_pdev)) > return ERR_PTR(-EPROBE_DEFER); "||"? or "&&"? You want usbmisc has already been probed. > > data->dev = &misc_pdev->dev; > -- > 2.4.3 > -- 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/