From patchwork Wed Jan 31 18:09:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 10194415 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6C41360595 for ; Wed, 31 Jan 2018 18:15:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4C79E283C5 for ; Wed, 31 Jan 2018 18:15:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 410EB2847E; Wed, 31 Jan 2018 18:15:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E1172283CA for ; Wed, 31 Jan 2018 18:15:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753600AbeAaSJx (ORCPT ); Wed, 31 Jan 2018 13:09:53 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:35219 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753213AbeAaSJv (ORCPT ); Wed, 31 Jan 2018 13:09:51 -0500 Received: by mail-wr0-f193.google.com with SMTP id w50so16033490wrc.2 for ; Wed, 31 Jan 2018 10:09:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=NqSLjfFhwiN5Ik/CdRtVsUVXH6ShLbavwHEfw/1U12w=; b=G2PWfPqiIIZWiyiLaFTZ12742KsvO9y9Q3GdNhQCYSUxyeLgecjgH8vpmyENRcu1nB 8FI4U65Cq1tZoP2ODSRCXF062R6OrFC2QfYrScomS0KcU5cDEehHK/HyS8IVC+e2w73z 51XMrhuhUOA2hDsr0N+quGUG3Uem4VkqwfmM7eraF8ne06R9axGY/nyifYI5v9eMhMvh uvRhudjY6Z0kZYuj+eXlHPoVuYBOV4ztYBXf7+86eYgKc9SiXZPD35dq1Ec+iQ2E/ATp gTD31cfxZTljce3Udfbafns71G2ll1xBbUHHW8jJ1z3yhQajUjGbkzVarr/bnIbzcm0f Ij4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=NqSLjfFhwiN5Ik/CdRtVsUVXH6ShLbavwHEfw/1U12w=; b=GIAb+qxrtaZbqhhfUB/Rsd+zXD8aDCrvyaEKpglHW9b79Y2FssFzdQM2SllpxtXaoL X27i3rPQrwiN4Bik+pczvXiuHZ4X91jfbxLC1Qoo/9yU/KAK6KXISnuRFnlDlk8NZ86Y h87JCIL3LyZU5Jt99fXSJMlrox/iuQKV3lebNuaZ3lIExLxlaTFvooWkjJEyRLn0iAfI pbimw1HI03vPkEtWuPWvkQbluPybPqiYAiwReyswltsorrvdJhd/LxMP10M/1i7q9Hzf 2zuoU6/t2uDK0JuxufLuOgPZA0ro9NtGGkfWCosYxXsGrcBLVxjjJqNxIwekRjgNfvK7 sw6g== X-Gm-Message-State: AKwxyterplpJ0HXWNV2mJTtD0s05QJF1NM8nVN8p5xm+b4B3y6lYWdMM Db+o0iP+EBXWDP6SWpLRZlS6AQ== X-Google-Smtp-Source: AH8x224IqkBkVM71q0rPCyuDu5yCRB+r5YKYYHp8DSJoGmE+q1TI9BGrHPrxIFR47CaBEWEEdSUlJg== X-Received: by 10.223.152.172 with SMTP id w41mr27474428wrb.12.1517422190647; Wed, 31 Jan 2018 10:09:50 -0800 (PST) Received: from boomer.baylibre.local ([90.63.244.31]) by smtp.googlemail.com with ESMTPSA id f8sm341977wmc.3.2018.01.31.10.09.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Jan 2018 10:09:50 -0800 (PST) From: Jerome Brunet To: Neil Armstrong , Kevin Hilman Cc: Jerome Brunet , Stephen Boyd , Michael Turquette , Carlo Caione , linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 01/19] clk: meson: use dev pointer where possible Date: Wed, 31 Jan 2018 19:09:27 +0100 Message-Id: <20180131180945.18025-2-jbrunet@baylibre.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180131180945.18025-1-jbrunet@baylibre.com> References: <20180131180945.18025-1-jbrunet@baylibre.com> Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The 'dev' pointer is directly available in gxbb and axg clock controller, so consistently use it instead of going the through the 'pdev' pointer once in while Signed-off-by: Jerome Brunet --- drivers/clk/meson/axg.c | 8 ++++---- drivers/clk/meson/gxbb.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/clk/meson/axg.c b/drivers/clk/meson/axg.c index b5dacfde64bb..0db0fc0762e2 100644 --- a/drivers/clk/meson/axg.c +++ b/drivers/clk/meson/axg.c @@ -804,7 +804,7 @@ static int axg_clkc_probe(struct platform_device *pdev) void __iomem *clk_base; int ret, clkid, i; - clkc_data = of_device_get_match_data(&pdev->dev); + clkc_data = of_device_get_match_data(dev); if (!clkc_data) return -EINVAL; @@ -812,9 +812,9 @@ static int axg_clkc_probe(struct platform_device *pdev) res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!res) return -EINVAL; - clk_base = devm_ioremap(&pdev->dev, res->start, resource_size(res)); + clk_base = devm_ioremap(dev, res->start, resource_size(res)); if (!clk_base) { - dev_err(&pdev->dev, "Unable to map clk base\n"); + dev_err(dev, "Unable to map clk base\n"); return -ENXIO; } @@ -849,7 +849,7 @@ static int axg_clkc_probe(struct platform_device *pdev) ret = devm_clk_hw_register(dev, clkc_data->hw_onecell_data->hws[clkid]); if (ret) { - dev_err(&pdev->dev, "Clock registration failed\n"); + dev_err(dev, "Clock registration failed\n"); return ret; } } diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c index a5f25cc1944c..423abcb8ef88 100644 --- a/drivers/clk/meson/gxbb.c +++ b/drivers/clk/meson/gxbb.c @@ -1950,7 +1950,7 @@ static int gxbb_clkc_probe(struct platform_device *pdev) int ret, clkid, i; struct device *dev = &pdev->dev; - clkc_data = of_device_get_match_data(&pdev->dev); + clkc_data = of_device_get_match_data(dev); if (!clkc_data) return -EINVAL;