Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3755916rwb; Fri, 30 Sep 2022 07:58:29 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5QuxNkkd+/nv9AcVw8/OklKNns2Dokxx/AEZ3d5dQ8laUkr0nL8vycMNtgvzvqgtK7OYf1 X-Received: by 2002:a05:6402:42d0:b0:457:d16e:283d with SMTP id i16-20020a05640242d000b00457d16e283dmr8104254edc.395.1664549909348; Fri, 30 Sep 2022 07:58:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664549909; cv=none; d=google.com; s=arc-20160816; b=bZoLnWkUgXHGEzt23KbRVR4hzKqfHCIumL5CoZrMIIzaSywdMhPXGladAXoxKjD+1u 4Ilrgu3rX1+SYJGBIJfPPqASOGwUqcbZZUYFjDMJkE0H74bwUSCtENFA7JHtWrHQ3qj8 /5hSgI/Z9tHV8EQP6hGyhCs9syzkhWYWA48LXXp/5i6qusnfDnMZddMqOBuDsyZBOmpz xrnhMQ2FyZmKIvpOt30IJIoqisgJPLy4oU1XzuUWAEf8RwHSochcjplGgco0yA6oQnlr n7+zG0BlJHK+rN/Fn4VuDjVEo1n/I6mAZlX6aaJEF30D0S9LMywN1EVVkseG/jhJQa4Y /MCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=/EZmdozygV0BZ7sk10V8fgsfTC0ReB20DWquzbP5hNE=; b=DIHQ2DoLSDONQd8aEIO7UyZgD6se2Rq0MSz2slMY6zX7oFKedrXVdM8Ph8uQCl6fRC p28MhvnUaK+glXqaEkJUV8qO02QIMj8dh0LshpXh0L03iHbYsBSQI3rF6mvlj4Ka/vmb 3BIdtBKg8COQzebnNFz+u228shQgxsfhHe/8MR/JES2dP7SZMQZSHoSTsuoifYHJ3FSq Aq0obTbWJJ0f9u4iKu7FfFsSuPQEgJDAvzg/mYrzuvG9lSgWf8c5vBCa+3yIQWaqbKgK 6tE0FnvEXNrGTxnTVLMhsN1MAZdDxM20Tx/A5XTYbECjkWBdSwF9HQdaaYjtFs7oRSIy mUVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=7qfxi7rW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e25-20020a056402089900b00456964d3369si2116367edy.230.2022.09.30.07.58.03; Fri, 30 Sep 2022 07:58:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=7qfxi7rW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232011AbiI3OVM (ORCPT + 99 others); Fri, 30 Sep 2022 10:21:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231963AbiI3OUm (ORCPT ); Fri, 30 Sep 2022 10:20:42 -0400 Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC0B070E79; Fri, 30 Sep 2022 07:20:39 -0700 (PDT) Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 28UD1nI3032525; Fri, 30 Sep 2022 16:20:22 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=selector1; bh=/EZmdozygV0BZ7sk10V8fgsfTC0ReB20DWquzbP5hNE=; b=7qfxi7rW2IdOcohJFSpVMSev1dmWkDTg5zl5obsYGUFjo7WfiUMkLWa1DVGbEtZEzRQ1 ZDVcP7kOCzMV6t2D33H4m9kd5Ql0Ze18HaQUPg6Az08kyMDizZPKZBcVPlablf/4DGy7 vTHYDGd6MhoNc7eIgCskyH7FfXPKJIapzQhzUxczR1hvilFBbFq7b7JSr42VkOcS9pKF r0ilJ6WJAoIDBEKZfNqbKEwa+dAJ6A8eO0ookL2rEMJCu9eQCwlbvMxQTM1+Kj5zl5rD YfgbHckryTe1TVRA7TCFDq4IpV97E1xWnt332cD1dNwAgNpAmVFMg+g6E7o42HA9kL0Y /g== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3jwxnmhbry-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 30 Sep 2022 16:20:22 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 030DC10002A; Fri, 30 Sep 2022 16:20:21 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id F0FDF2309E9; Fri, 30 Sep 2022 16:20:20 +0200 (CEST) Received: from localhost (10.75.127.119) by SHFDAG1NODE1.st.com (10.75.129.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2375.31; Fri, 30 Sep 2022 16:20:20 +0200 From: To: Felipe Balbi , Greg Kroah-Hartman , , , CC: , Jerome Audu , "Felipe Balbi" Subject: [PATCH v3] usb: dwc3: st: Rely on child's compatible instead of name Date: Fri, 30 Sep 2022 16:20:18 +0200 Message-ID: <20220930142018.890535-1-patrice.chotard@foss.st.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.75.127.119] X-ClientProxiedBy: GPXDAG2NODE6.st.com (10.75.127.70) To SHFDAG1NODE1.st.com (10.75.129.69) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-30_04,2022-09-29_03,2022-06-22_01 X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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