From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90BF4C433FE for ; Sat, 22 Oct 2022 11:08:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230023AbiJVLIh (ORCPT ); Sat, 22 Oct 2022 07:08:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231149AbiJVLIQ (ORCPT ); Sat, 22 Oct 2022 07:08:16 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D37F52D37C5; Sat, 22 Oct 2022 03:26:54 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id CA302B8077D; Sat, 22 Oct 2022 10:26:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CCFC0C433C1; Sat, 22 Oct 2022 10:26:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666434411; bh=dTTyLGATFbJsGsPhwEJxmVPaeto9T/Tpgmku7JGHixs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Q4T17/U4PIMJuTG8DgpKQAMg3Dxqwz2xAgQI7I6TnrONxSufLduiKcLRiyKnP5tcy pGUECVdCnFjJT2zwjH8w4DQBsa0HYk7HalSZftIancT0o0ltV+BEbgEzCVqVOGO6xr dG7Pb4s7Xb6Cpk24Yg8qBQqrUGc9aQqIuWgkwLds= Date: Sat, 22 Oct 2022 12:26:48 +0200 From: Greg Kroah-Hartman To: patrice.chotard@foss.st.com Cc: Felipe Balbi , linux-arm-kernel@lists.infradead.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Jerome Audu , Felipe Balbi Subject: Re: [PATCH v3] usb: dwc3: st: Rely on child's compatible instead of name Message-ID: References: <20220930142018.890535-1-patrice.chotard@foss.st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220930142018.890535-1-patrice.chotard@foss.st.com> Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org On Fri, Sep 30, 2022 at 04:20:18PM +0200, patrice.chotard@foss.st.com wrote: > From: Patrice Chotard > > To ensure that child node is found, don't rely on child's node name > which can take different value, but on child's compatible name. > > Fixes: f5c5936d6b4d ("usb: dwc3: st: Fix node's child name") > Cc: Jerome Audu > Reported-by: Felipe Balbi > Signed-off-by: Patrice Chotard > --- > v3: - rebase on correct branch > v2: - add missing reported-by > - add Fixes > --- > drivers/usb/dwc3/dwc3-st.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/dwc3/dwc3-st.c b/drivers/usb/dwc3/dwc3-st.c > index 6c14a79279f9..fea5290de83f 100644 > --- a/drivers/usb/dwc3/dwc3-st.c > +++ b/drivers/usb/dwc3/dwc3-st.c > @@ -251,7 +251,7 @@ static int st_dwc3_probe(struct platform_device *pdev) > /* Manage SoftReset */ > reset_control_deassert(dwc3_data->rstc_rst); > > - child = of_get_child_by_name(node, "usb"); > + child = of_get_compatible_child(node, "snps,dwc3"); > if (!child) { > dev_err(&pdev->dev, "failed to find dwc3 core node\n"); > ret = -ENODEV; > -- > 2.25.1 > Is this still needed for 6.1-final? thanks, greg k-h From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E2DFAC04A95 for ; Sat, 22 Oct 2022 10:27:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=c4kXeMYkQ6fda71M6UB/PCO1iIjaPtA57t/mSZLnTq8=; b=z5A+UtGi+h8Z2P qPhJa5SCvJRMdbc505zmnWeE3GkbElx+8Ky2LdXdlc+BLS92WVOMM2QigapbQdKEcoK0fDFebKS2m ZKxavNi6MFx5My3NvBO3j3cb1L8GM6KyB+TjpHKkHbDSGZm6cNk4el3UClSkIRq5tPN+lRCgpH/Tr /2pMq7geeFoDg8PDA4hmkCaUCdVcM59OMe+aQradQhwG3+O3fkjcih+th5aiYHyPyg+xgL1pRYJIB f2CE9E0brsCkleoPqPXCxm7IcOfyArrtGcw5rf69Ch+93GhSycG60N7rZf/WY5CZX+s65LVFTEfgz uQ7NW3OymZuuT1BXOmbQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1omBiR-00CD3K-Jy; Sat, 22 Oct 2022 10:26:55 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1omBiO-00CD2Y-Sk for linux-arm-kernel@lists.infradead.org; Sat, 22 Oct 2022 10:26:54 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1F17660BC3; Sat, 22 Oct 2022 10:26:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CCFC0C433C1; Sat, 22 Oct 2022 10:26:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666434411; bh=dTTyLGATFbJsGsPhwEJxmVPaeto9T/Tpgmku7JGHixs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Q4T17/U4PIMJuTG8DgpKQAMg3Dxqwz2xAgQI7I6TnrONxSufLduiKcLRiyKnP5tcy pGUECVdCnFjJT2zwjH8w4DQBsa0HYk7HalSZftIancT0o0ltV+BEbgEzCVqVOGO6xr dG7Pb4s7Xb6Cpk24Yg8qBQqrUGc9aQqIuWgkwLds= Date: Sat, 22 Oct 2022 12:26:48 +0200 From: Greg Kroah-Hartman To: patrice.chotard@foss.st.com Cc: Felipe Balbi , linux-arm-kernel@lists.infradead.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Jerome Audu , Felipe Balbi Subject: Re: [PATCH v3] usb: dwc3: st: Rely on child's compatible instead of name Message-ID: References: <20220930142018.890535-1-patrice.chotard@foss.st.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220930142018.890535-1-patrice.chotard@foss.st.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221022_032652_988682_E7C4C379 X-CRM114-Status: GOOD ( 19.75 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Sep 30, 2022 at 04:20:18PM +0200, patrice.chotard@foss.st.com wrote: > From: Patrice Chotard > > To ensure that child node is found, don't rely on child's node name > which can take different value, but on child's compatible name. > > Fixes: f5c5936d6b4d ("usb: dwc3: st: Fix node's child name") > Cc: Jerome Audu > Reported-by: Felipe Balbi > Signed-off-by: Patrice Chotard > --- > v3: - rebase on correct branch > v2: - add missing reported-by > - add Fixes > --- > drivers/usb/dwc3/dwc3-st.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/dwc3/dwc3-st.c b/drivers/usb/dwc3/dwc3-st.c > index 6c14a79279f9..fea5290de83f 100644 > --- a/drivers/usb/dwc3/dwc3-st.c > +++ b/drivers/usb/dwc3/dwc3-st.c > @@ -251,7 +251,7 @@ static int st_dwc3_probe(struct platform_device *pdev) > /* Manage SoftReset */ > reset_control_deassert(dwc3_data->rstc_rst); > > - child = of_get_child_by_name(node, "usb"); > + child = of_get_compatible_child(node, "snps,dwc3"); > if (!child) { > dev_err(&pdev->dev, "failed to find dwc3 core node\n"); > ret = -ENODEV; > -- > 2.25.1 > Is this still needed for 6.1-final? thanks, greg k-h _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel