From patchwork Thu Jan 18 12:08:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 10173043 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 E2FAD602DC for ; Thu, 18 Jan 2018 12:09:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CA02520416 for ; Thu, 18 Jan 2018 12:09:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BE7AF27CAF; Thu, 18 Jan 2018 12:09:01 +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 6934020416 for ; Thu, 18 Jan 2018 12:09:01 +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=pfefaL+PcJd4tQGwC8iFUzGWoII1diDp1xIxpjh8YJ8=; b=hWXAXDECscoAapu8leEOKaxg+H oGhayC0tblHZxRTuqTIaPokjYr9V7kEi+IYnTddDCutcq6DiT9PidWiMzJtD7X8SIxBpC0uVEF0uN mZFOC3ieOncKHaun8/2ix8+zeJXdezA6KUPGmcRHY71Qc296b6jb08LpsT2jmVTZ6W7u1kLmSo5VN WusV1iNjlurGMFvB99RzuAWO7w9V86Pg3dxnso1EgcPt5XOz4dG+dD7pqzv+7KiXDoX/PWY3iEjMT 9ChIaJpCCBwPaBNV0Xshp/OW0eJjGBQtuP8RgMeUOneCsfFcPvnur4UViNwZVcgk1Ptxm3CT7S6ZH dUr3V6CA==; 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 1ec8zy-0001XH-Oa; Thu, 18 Jan 2018 12:08:50 +0000 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1ec8zu-0001SM-O5 for linux-amlogic@lists.infradead.org; Thu, 18 Jan 2018 12:08:48 +0000 Received: by mail-wr0-x241.google.com with SMTP id 100so22271687wrb.7 for ; Thu, 18 Jan 2018 04:08:36 -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=QFoQMZiyehBocBmwekax7Tymc2dUfrd+UOH+JxUcWZQ=; b=v9J2wWf9bknPbt8TEY/wWYLdyZ1Mhk8Mv3h8LKd/+UWKzadSIOWwlqUPdVJBjWCJnF kiR9tuBLwdsx7F78GoXgs2d8/Ip9Q7oEkg5R8Lgc96+NXWfQFKWxi74CK9JP7OgfXEkh Zpw/jXayHGyUpmi7wKFe0vxI+Ltir8EhcCntGFN5Ug22gtST5cku3V5JNjfJBwp6AV7G pymVNESU7VG1c3INb9+1bs22lzv4N5J3mFfeuuzskggFBJ9hzCwQ920AkwmdhLBHZcEQ p0KYd5sqx4gK4BEJGIHRD5+Mpj7qKDOe/F5bLuWNst2/syBF6FJsfjrifpCAReAQUgvB TL7A== 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=QFoQMZiyehBocBmwekax7Tymc2dUfrd+UOH+JxUcWZQ=; b=hJ5ogZNjIJdmU0HKh/eVKuzkDjSjxPVvq3JremgLxz4sp+zgHVsNCQaVlitm3sNsCk YH+e68jva9vrUiu9HQy8SWO0VMV9Gz/vzDFnUJBgvATfDzaZaAeV+GNsuLeuIyfTwXEx krFTN9eqvYUwadzE+gXYu1Bd5Tnwrd+UKCo34jF6wKoPrD+EcnMbKuBau2rchwx9tKpp sUS10NBog5DP0tA4ojVrIjgxvVY4lZ68vrBMftzM0D4d5paka34VvmlypIIMgdfQgb+t 9gFbH+wXSDDystssybi8SYKgN4VJoU61yJ4cIaYkMo/2Q8ChjKmaPQzDtYqRspg7te/C UpfA== X-Gm-Message-State: AKwxytcMLEJAU9X16GN6Upi3sAVzQyezfyojRAxlrAa6tnCVaixDgr9f YTfcR+JThj1ddN95sIUrAGOH4g== X-Google-Smtp-Source: ACJfBos6uEGk10STN2uITJkySxHu6Kx9IJCKgI9eUfsbp0ABH/UTD1qBgh4b1v83YTspRigrZTbflw== X-Received: by 10.223.167.66 with SMTP id e2mr6189101wrd.91.1516277315062; Thu, 18 Jan 2018 04:08:35 -0800 (PST) Received: from boomer.baylibre.local ([90.63.244.31]) by smtp.googlemail.com with ESMTPSA id b8sm3341948wma.2.2018.01.18.04.08.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Jan 2018 04:08:34 -0800 (PST) From: Jerome Brunet To: Neil Armstrong Subject: [PATCH 1/2] clk: meson: use dev pointer where possible Date: Thu, 18 Jan 2018 13:08:30 +0100 Message-Id: <20180118120831.8349-2-jbrunet@baylibre.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180118120831.8349-1-jbrunet@baylibre.com> References: <20180118120831.8349-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: Kevin Hilman , 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 Acked-by: Neil Armstrong --- 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 1294f3ad7cd5..87aba8e871a0 100644 --- a/drivers/clk/meson/axg.c +++ b/drivers/clk/meson/axg.c @@ -873,7 +873,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; @@ -881,9 +881,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; } @@ -918,7 +918,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 af24455af5b4..ba1023983d79 100644 --- a/drivers/clk/meson/gxbb.c +++ b/drivers/clk/meson/gxbb.c @@ -1976,7 +1976,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;