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: 10194331 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 5E73E60380 for ; Wed, 31 Jan 2018 18:10:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2C18B28771 for ; Wed, 31 Jan 2018 18:10:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2044D287A8; Wed, 31 Jan 2018 18:10:35 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B837A28771 for ; Wed, 31 Jan 2018 18:10:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=2C3B+hDgW9UqtkzV4HPCcB0O2H8YMK5BtcpAtg5ASHA=; b=DaUsr2f+ruvWH5wi+W/FNidK+8 HW4TSAjQY7jKS8+tEiYQ3l+f9RlkLl6v8tr8QRnIAT0oJzBnc2haJhpNp9LlAV5R45mggPhMrel0V HYtVR6gyozU0b083N41urqvOBvJAcbv6nrg4r1yUJOqsXDsbbDAjLbderHcKreyNR3g9T3wtDOXO3 Uq2mISUVo/OO5htDedXv1CpYwKL4tj9YXF8sAc1YDxbIm5/FzOm/p/UjAx/W4FdlIXntI/xvlzc2H G6cwA/0XyS6A8hoHe/NWFD6Y2H98QrVCc8GNu4iVt1H8PDhQmmhMza+RmkG9hVArfr2zyf5tP2Nl3 jpeEQsmw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1egwpx-0001o5-MN; Wed, 31 Jan 2018 18:10:21 +0000 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1egwpg-0000KY-De for linux-amlogic@lists.infradead.org; Wed, 31 Jan 2018 18:10:12 +0000 Received: by mail-wr0-x244.google.com with SMTP id f6so14388164wra.6 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=LcpPCS3GOFwrMfmB4e2/QldU+Wfvdpnyt6agz3Icft5LFwi7STISkki99HNbRgsOYR FJrafSP7dS/5MdVR/gHz35Kkw7FrQb9Wxvx6MWUtDrhy5xaTYV35z1WMzQcwd8ZWCeqo c/wPe7Z8sn82O7pEjSR0f80UsMiNcKFiZXX80dRbnOU3kZg/S70yTbaWHHXerNV47xe1 gW9CeqzAl3OGwZd6LGtDTF15/L4GUUnXHS4Pc0ze+4/fL79R/4zMjMfzS+TN3p9fVYmr fuHxiTO53k5hmCRyfaljE0UVnYG4YGFP1WGDiFBD//rQJV8oEdGSptwuYm9dqbISMMoE TGww== X-Gm-Message-State: AKwxytd18s1eJLSFOex+QvFXFi49fbGt9pVjunoNX1LAIoDCl8FJmbSV lnE3AaZHvqqw2lI9vZX0R9MZ8A== 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 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> X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Turquette , Stephen Boyd , linux-kernel@vger.kernel.org, Carlo Caione , linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, Jerome Brunet MIME-Version: 1.0 Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.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;