Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753233AbbHGF4c (ORCPT ); Fri, 7 Aug 2015 01:56:32 -0400 Received: from mail-by2on0136.outbound.protection.outlook.com ([207.46.100.136]:3427 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750949AbbHGF4a (ORCPT ); Fri, 7 Aug 2015 01:56:30 -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 12:46:04 +0800 From: Peter Chen To: Tomeu Vizoso CC: , Greg Kroah-Hartman , Subject: Re: [PATCH] usb: chipidea: imx: properly check for usbmisc Message-ID: <20150807044603.GB13200@shlinux2> References: <1438866594-5875-1-git-send-email-tomeu.vizoso@collabora.com> <20150807021145.GA13200@shlinux2> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20150807021145.GA13200@shlinux2> User-Agent: Mutt/1.5.21 (2010-09-15) X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11FD023;1:rxNM9LvR5cheQ6upGCbuWZfcZMiH8ItphI9hUJ8c3u5GIhuThbdh73S4d0n6+MvhpQ1Y0f8mXAfTO7xuvX9Qujrs7qbO9Iu3xIHkn5j7EtF11ox0ezdF73Ouju24lCth7Nj7Qc928308s+PX0XqptKEB9OjcHhScP6y8XoyyoRo5m2zQUlW+zZh6x8papNhrDOPYZMOb9DqkDdsh5w/9AX3G8ibRqsAV/kZq/TOISA7xzsrEt3eMP/wFHQx+HgppoKzI+EEbq+3i4m3S7pQiyQYc9M+u17F3cBdKc77Qc9Cf30sCT5wcgdSV8lujrIjF 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)(5001860100001)(46406003)(46102003)(50466002)(83506001)(69596002)(81156007)(85426001)(105606002)(106466001)(4001540100001)(5001830100001)(77156002)(110136002)(5001960100002)(62966003)(97736004)(4001350100001)(104016003)(68736005)(76176999)(47776003)(77096005)(19580405001)(92566002)(97756001)(50986999)(86362001)(33716001)(2950100001)(19580395003)(54356999)(33656002)(87936001)(64706001)(23726002)(189998001)(6806004);DIR:OUT;SFP:1102;SCL:1;SRVR:BL2PR03MB484;H:az84smr01.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BL2PR03MB484;2:MJ1iH52YKJ6yMLYNqWrtQ5cNRCIihB2jfb85Xq0RJ8pxI2zzTJepQvadMgnBTD3rxDhaEVJwyhl8GD4LOlaHjs2RQaaaoPni8qLpthFpWGNUAuZpIDrEXVMf3Kb1/otkoMmvepCXoytSlFQFv5thq1IVS4GWPUOXY91p+fbDXyw=;3:YUsudzQwS5X2Lj/yauYKhyVz/CzS/0cUYtx4f887WHrKV7lATDv7qblRIDO2VAfzBwflTCN2tXXZMNdkYmP/I4Wb0SUUFZVTq2/MBtikTSzqvgjLJU6PvomfIhC/BtildHOX6d9s1+L2YMpx/Oy5tQOqAjXZ1R/jWHSzUImjUOm91SnFSqyPsyAbBoYcwx0WJU9hh4WLiYRtpTSTjZNl5XjuYCBmhq5ryrd90l9lg/Y=;25:07Nz9K30lB3blqRVSJ5GfzA8GqSsTWwUqPSbnXpdjuWTzSPOH3gG4ut3V/RwvjJTDOyBAyCYvlMPNKj/+lWd1L/l/GmLKiV2gRo7OgxtBWA4UFbJp5E1UdH4cydiEdyLL550jMnmNy0sjofn105ckgnvFxBK6LiRlWf9K2Na+VLvQ6SZ1LK1exGTLhBgQclWz8omaI94K9EaHDeWU6vgjPWsv8GOBxT/pO5tnK5g2sdad1XUjL8S51CCKFo6M9XI X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB484; X-Microsoft-Exchange-Diagnostics: 1;BL2PR03MB484;20:IMpe2AJJrHXW3rSu7rABtor9i80UFFHVJ3288yFHjBL8Ht/RxZDyZmFkL8nb71WG57jcjklSj3JQT1mj23uV2U766u8cfNAd8ruBQITE0VAjydJqgZPvwtbg9TfpAlSlh+Ybuyh6qX8XnXKpSeX0RwinrtwXZcnM8lzfNU4P9skqbL+7GTcrDmkk+Mevj6rpj3Ucwlt+MWFuOn14vh5ZfueOQap2hS0Y4NIV51vptvJplJBRySmS+hSSaHwusJtzjHufAyBE5TkrjuiVnKc844vjDd+fAaqdK3ROSNtSnebfV9XZifrsNPdoiVQHiOWZ9ltu6ahO2I2RHcb+Q0SGIvhnUjLpn33BWWMztgapcmI=;4:xS10SivU/r3rwlecvU/fj7571GML853BA+rJk4oZDqRFUNyi9AvL/utSZ0USPcKPBdDYjvlMGUm8V+wKvHaR8ht6qWPUYMRhjU+gg4w67nAF2A/64r1WVxWMof7SKcfSP26MTI7FdziXATEXwl7VCeOpWJ7MQZqC+mEH4Zk7Q9O5w3WqNTlkCNHsDKFUZZOAEAVLxEvMRaBaXGPzLfeWQsp3qVfyHJRStrvAH1K85s0n3c5sU9dNQMP8XvLq4ofmoa0Bq7G32V/Whi4of7StqWq8G3o4BgONBLrnVKy/voY= 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:BL2PR03MB484;BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB484; X-Forefront-PRVS: 066153096A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BL2PR03MB484;23:3vEN3FsaKnmZ0ay4qFCM89IMRfJRS9mr5CuyhS8MVj?= =?us-ascii?Q?LtTnZjFoed68VdU7EvvtRcaCHOS8m0519CpdO72YEmfTy3iACUGz5ru9O+op?= =?us-ascii?Q?bHJSaZXemEjI4A1vNeVHXTmTm5Oxg+lBF33h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zagZFmgXtZr3QNJ01JwoOsP1bV7S9lA4hJq9qXiCQXGuQK3gAzV6mKb3D2T?= =?us-ascii?Q?2ke3yfxhvmvCh1XCkOalddiPblOKw68yk8Fh1qNAkwkXzlwBPg2h/RgWJdei?= =?us-ascii?Q?dCEccKziE/NpYC5wHC01gdN6VCEsOUWKb2jVHHvIPuhe9e3hXOJ9agReTBAi?= =?us-ascii?Q?n1k9p+t1aF6EQ=3D?= X-Microsoft-Exchange-Diagnostics: 1;BL2PR03MB484;5:w+yf1n7E6K4J7QbnCN4RWO5wkUfO5zBHD7a7DMzoWjtVudxjQ3GHXu/IdpgdOJx7WSjrUDCnE07TxTBEdDVDzxWnLEymzM3eM+klwbyjWAc2RwAWAAJn1HHnHVqSDVdiLf80nXXeRIu9lZlTOn2qgQ==;24:nBNbXcyzSzhrj5u9jqKBQOXT7chClcqt8abWoS3pFLNOg+FF7LBHVyOvXB+P/qUZcwA3H3+cHFK36wmcJKnqmAFLoYW9EpHKRbs/d/HH7fI=;20:w32Ehk3isEJz6OzkOwmXO2zDjlg1VEmrtOMQjVqie7D+PZvabQKp4TymK+VKyXp9keV7Y0ntaEM2FqUSNm97Og== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Aug 2015 05:56:27.6632 (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: BL2PR03MB484 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1600 Lines: 41 On Fri, Aug 07, 2015 at 10:11:47AM +0800, Peter Chen wrote: > 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. Oh, oops. The patch is right, I will queue it. -- 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/