Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1498163yba; Thu, 25 Apr 2019 00:22:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqwcMHAHAu7N0qCLL7QZgWiUh9eaIzx6n7mS9dq/5pVqL+f43ww5BXkDDM1JIPEijsnpOwPH X-Received: by 2002:a17:902:324:: with SMTP id 33mr26923114pld.246.1556176952584; Thu, 25 Apr 2019 00:22:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556176952; cv=none; d=google.com; s=arc-20160816; b=RCsYmAX1MpPDskCfXfYN7V6DBzGphH+Zt9uXGgB/qtA1uDr/adbf7/zktzBPAwclJN uNhqICLjEPcym3RSO4vh288XN93bnzmTxJ4oYKutf8D8HmIoDUzKs+bjF+AytQyPbTKk 8ssP4KH8Uha9lMwueU0zK3SVBPntBcAZj3GVaWIk/EDq/3cNjamsCXFQaGkkNtIPk8a6 zL4WIXzdguNfPJz6NNqnRa+iL5Y0j50AdXsZJZoy7g3gLzF0jDtDkwdTUn4cO2U+CGep r5CibNdMKhdC/uJ9VnhmaMsREFiTOufU1UGKdzRAvxsViGXDIf0DtpEWBEvOCpjpBTZV XoNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=unQq1+z0iNRuTfKra4LE6BoXbsmw8kudBXsZCBKVcGc=; b=PPVm3mUCYL8CEfP6G0uhIH6Wg8x9MPFkbpXA2LyPRu4pekhA4ARQ7wLQ+xUxmH4NH7 reP/EuVbvVCnO+XMDH+ebKBb6FG7+St51ghHe1wSdFcqQ2Jbf8Pbr+AF6A1uldQWixTF DAS02TAKHLuZ75or+tcqi9OuMaKeRzJItGGqbbV6qwOqt+YecuMJtAXVIszc77FWwwWc ny/NBbR+1X0hym9ds4YYMJFa1MotTJhhiwn/a1P1drhmmcwLgZ9N3U5JmJ3CpWm1iQWD GdJ12d79JhPzuVbywSyMJIv3BSQ+UGvnr5fxov2g+yzS5QUwIqlM45LU+uOT3JPlUW8+ M5AQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=xMGgM+6o; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h1si10653099pgk.39.2019.04.25.00.22.17; Thu, 25 Apr 2019 00:22:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=xMGgM+6o; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731393AbfDXWYk (ORCPT + 99 others); Wed, 24 Apr 2019 18:24:40 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:41102 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726184AbfDXWYj (ORCPT ); Wed, 24 Apr 2019 18:24:39 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x3OMOYiO020824; Wed, 24 Apr 2019 17:24:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1556144674; bh=unQq1+z0iNRuTfKra4LE6BoXbsmw8kudBXsZCBKVcGc=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=xMGgM+6oGMR3omHrFCFZr+ix6SUJh63cOCO2wPsSjK3ZEK/fafjuZmZKkO3IrnBXM iqSlWMFdQpmulS3JSjE2TM+EUyJ2D3w66ycIyX/emWlKT/FOO39DlalOIQMEHmHTfZ T+dHhuc79VO5kcYwLv5AML2WrqTAC0maQwtQ+GaA= Received: from DFLE111.ent.ti.com (dfle111.ent.ti.com [10.64.6.32]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x3OMOXOT110553 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 24 Apr 2019 17:24:33 -0500 Received: from DFLE112.ent.ti.com (10.64.6.33) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Wed, 24 Apr 2019 17:24:33 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Wed, 24 Apr 2019 17:24:33 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x3OMOWCL049868; Wed, 24 Apr 2019 17:24:32 -0500 From: Grygorii Strashko To: , Ilias Apalodimas , Andrew Lunn , "David S . Miller" , Ivan Khoronzhuk , Jiri Pirko CC: Florian Fainelli , Sekhar Nori , , , Murali Karicheri , Ivan Vecera , Grygorii Strashko Subject: [RFC PATCH v3 net-next 01/11] net: ethernet: ti: cpts: use devm_get_clk_from_child Date: Thu, 25 Apr 2019 01:24:17 +0300 Message-ID: <1556144667-27997-2-git-send-email-grygorii.strashko@ti.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1556144667-27997-1-git-send-email-grygorii.strashko@ti.com> References: <1556144667-27997-1-git-send-email-grygorii.strashko@ti.com> MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use devm_get_clk_from_child() instead of devm_clk_get() and this way allow to group CPTS DT properties in sub-node for better code readability and maintenance. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/cpts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/cpts.c b/drivers/net/ethernet/ti/cpts.c index 499806ce4cd5..aad118e71b61 100644 --- a/drivers/net/ethernet/ti/cpts.c +++ b/drivers/net/ethernet/ti/cpts.c @@ -572,7 +572,7 @@ struct cpts *cpts_create(struct device *dev, void __iomem *regs, if (ret) return ERR_PTR(ret); - cpts->refclk = devm_clk_get(dev, "cpts"); + cpts->refclk = devm_get_clk_from_child(dev, node, "cpts"); if (IS_ERR(cpts->refclk)) { dev_err(dev, "Failed to get cpts refclk\n"); return ERR_CAST(cpts->refclk); -- 2.17.1