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: 126386 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp968013ljc; Wed, 31 Jan 2018 10:09:59 -0800 (PST) X-Google-Smtp-Source: AH8x226b4RmXKnQbHVppqDyxaYuAJPSV9Ak8eW+fBUg9yuXn3bJrufyx2RRHmuOXbiJEiy+ShGFg X-Received: by 2002:a17:902:b7c3:: with SMTP id v3-v6mr19850706plz.307.1517422199149; Wed, 31 Jan 2018 10:09:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517422199; cv=none; d=google.com; s=arc-20160816; b=wJxtWxcWbkg4HREQA0wDhS1C+k52C14U9w7rT8YrqJtG3v59vP158W6PD5MU0cLJ/x EIKUJEuNfzrxesZDrI+Sy9N38gaGaTJviZmyN8p80FxlX/gQxqyD4esJBZkcf58coaIN EbyYu5LVRHnVV32G5W7QGirZyL/a+ntI0Ep+nbuXx+g4DOHQjJVNd0uZHRNJJEoffJ12 1oHjOUBbdMeTyxCArfnDN54KC4C9aWei2VrMUiGJ9rzCWu9K+CcQfJFJCo5lUKVOuxbs 0kQj7PvLZ3MPqasJhpFZd4uJ0XQcp8Oh4FsCWHhp6eVjTLkaijM6bJsu/7HKUOE1vgSx NO+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=NqSLjfFhwiN5Ik/CdRtVsUVXH6ShLbavwHEfw/1U12w=; b=JKpiqT/hF/sINNx6y0m2hkFxyPjQGWnMcoNnBP57DknhgcAQTzSemiRhbg4vsKFSO+ KvX6PO8ssp+nT8qoFCNhTlhCevX/PAMkwr5rw+KevjMU+oyo2ToBCiZvPOVL5830kheq BOXhMD9+lhZY4YZHjLKRQaxETQ0u1CfyGv0CGolrog0JijwAIPajBOQaBCWzSZ9Ylst9 Bqdl+sE8ixTBrsaaITTtK6SOT2DT6dmYj1ZPyp/4n9IhOXbi9ikDZqveQoktq9Nq7P2U LRTQnqzHcnH0lzdSGSs9sMtu4tru5lrdeYjzCbqSQdsskW4gkigLIyHZ/rJ8GLrvdNZa T6dQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=G2PWfPqi; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z72si2476867pff.100.2018.01.31.10.09.58; Wed, 31 Jan 2018 10:09:59 -0800 (PST) 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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=G2PWfPqi; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753691AbeAaSJ4 (ORCPT + 28 others); Wed, 31 Jan 2018 13:09:56 -0500 Received: from mail-wr0-f195.google.com ([209.85.128.195]:36380 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753270AbeAaSJv (ORCPT ); Wed, 31 Jan 2018 13:09:51 -0500 Received: by mail-wr0-f195.google.com with SMTP id y3so6187251wrh.3 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=Jp966dcR5gisD0+rBCKhAjVHx9YpZFW1RKuH/FwYTxALQgwuMiciN9RvyZ/AVvdKQe RB0is01BEK6Hhp1BcwxGRuhM6qGyMj5cI7v6My1AcRVbuhiYM0tJZlFLJPl2vYoX58RA 1AtyQ7zm1Ms7ahSTtu8FWn/0GILFKg+EAFYU1YkOV783lWGg4jgav1JJLt36Zj6UR5zK XNbBJtrQ/Gz5ApaMLlFHC0bAuCDimDdMOmTYuhARxdlb49aOSYzMvpOUOKCirOvTPD0i Y1ntimiCAahyyjNXEnpaeltQfdISFZo8Fkd5BNWIJlpDQ+s5WPAx6cGFGULWlvL173Lh ig0w== X-Gm-Message-State: AKwxytcICVpS2u/gfUJhMMrtAwWa66lpnYY6H+2x+ed2Fmajn0sbbTGv fyJ0FGBJZ/OcsswRmNOdIlg1gw== 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.14.3 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;