From patchwork Mon Sep 13 08:24:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abel Vesa X-Patchwork-Id: 12488153 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41F5CC433EF for ; Mon, 13 Sep 2021 08:29:01 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0DED160F12 for ; Mon, 13 Sep 2021 08:29:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0DED160F12 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fs/WENfQt3CFSTr8IdMLGAkBMK8m4NHtIvNCcqP/7dE=; b=1HnQoEMWBWDCcN AucVWWxAouEZRjUTFrIFYWZL+OQz3OCdHGsA520w9gvdHqEyFzMcSUzTEKjLhEJ35AHSrycxlAP7n ah8YD0MMmMFi8v7Q/OvD65XHM3VMCO1nA5xlJSgoBtYct+sOBh/0E9jZpFS0n8r4Q+KkYJ5GBvOKj rl5iBLXyhEBsyuWiO0Jw0gGUwBv59ukjUb50heBfCCGzUqPtN1OWbWjNhoqmM6tt0zKAS/POhfjnR oW6ESxZMPQR9ZJ6m/if+/qyR7ZR/U8oS9lHndHvNxt8Yt05LIpbzqvIMX9L/vOT4dfZhQLDWORwUD Jwkn6NpcJsn3ghCDi2qg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mPhJO-000jpn-Lx; Mon, 13 Sep 2021 08:27:34 +0000 Received: from inva020.nxp.com ([92.121.34.13]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mPhHC-000j2E-G7 for linux-arm-kernel@lists.infradead.org; Mon, 13 Sep 2021 08:25:21 +0000 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 469191A2AA9; Mon, 13 Sep 2021 10:25:15 +0200 (CEST) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 39DEB1A2A68; Mon, 13 Sep 2021 10:25:15 +0200 (CEST) Received: from fsr-ub1664-175.ea.freescale.net (fsr-ub1664-175.ea.freescale.net [10.171.82.40]) by inva024.eu-rdc02.nxp.com (Postfix) with ESMTP id EB1F2202EC; Mon, 13 Sep 2021 10:25:14 +0200 (CEST) From: Abel Vesa To: Stephen Boyd Cc: NXP Linux Team , linux-clk@vger.kernel.org, Linux Kernel Mailing List , linux-arm-kernel@lists.infradead.org, Abel Vesa Subject: [PATCH 8/8] clk: imx: Rework imx_clk_hw_pll14xx wrapper Date: Mon, 13 Sep 2021 11:24:50 +0300 Message-Id: <1631521490-17171-9-git-send-email-abel.vesa@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1631521490-17171-1-git-send-email-abel.vesa@nxp.com> References: <1631521490-17171-1-git-send-email-abel.vesa@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210913_012518_747634_EA83FB51 X-CRM114-Status: GOOD ( 10.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org It looks much cleaner to just have a macro compared to having a function that passes NULL as dev to the lower-level imx_dev_clk_hw_pll14xx. Signed-off-by: Abel Vesa Reviewed-by: Stephen Boyd --- drivers/clk/imx/clk.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h index 4f3b87d8aee3..d170cb988f2b 100644 --- a/drivers/clk/imx/clk.h +++ b/drivers/clk/imx/clk.h @@ -185,6 +185,9 @@ extern struct imx_pll14xx_clk imx_1443x_dram_pll; #define imx_clk_hw_divider_flags(name, parent, reg, shift, width, flags) \ __imx_clk_hw_divider(name, parent, reg, shift, width, flags) +#define imx_clk_hw_pll14xx(name, parent_name, base, pll_clk) \ + imx_dev_clk_hw_pll14xx(NULL, name, parent_name, base, pll_clk) + struct clk_hw *imx_dev_clk_hw_pll14xx(struct device *dev, const char *name, const char *parent_name, void __iomem *base, const struct imx_pll14xx_clk *pll_clk); @@ -294,13 +297,6 @@ static inline struct clk *to_clk(struct clk_hw *hw) return hw->clk; } -static inline struct clk_hw *imx_clk_hw_pll14xx(const char *name, const char *parent_name, - void __iomem *base, - const struct imx_pll14xx_clk *pll_clk) -{ - return imx_dev_clk_hw_pll14xx(NULL, name, parent_name, base, pll_clk); -} - static inline struct clk_hw *imx_clk_hw_fixed(const char *name, int rate) { return clk_hw_register_fixed_rate(NULL, name, NULL, 0, rate);