Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2838540ybi; Sun, 9 Jun 2019 22:38:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqyhynYC6J4AfQBptNZTIdXhEdXynowtoRpvNYvS1/oZrDuMudfgcZoBsymQgyj1IofCoCIo X-Received: by 2002:a63:4726:: with SMTP id u38mr13911698pga.185.1560145138791; Sun, 09 Jun 2019 22:38:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560145138; cv=none; d=google.com; s=arc-20160816; b=UaJMP2Pwc4AmJf9UMFSKIzS8BlBMgw0L85/1LcruGeedwbpJ+8BSq4G9lU84d8grTV s+vQyC41Qdqcarj5FCX1WiC3xfts6ZEF6FAE2dhUApBD5w2bta3GSSYPIJNRRhQVL4+Y wDt6ZdOAU1oVXYvEhzDkI/C2Y6rP7ET4d5424ozS4bC/t5GlYiySGlFh9N6u8NGjgpsF MNWP97M7Yf0E3XPJY9MFXj8kybvsemmzbL+kEejUYo3XlIJfNH2Y83W7kK+5tRYjYgcn Yw4zH17fFiu3zDUKcZf05io1FwB7a93G/HSGPgmlxaStUnUCwq7tq3StLhFbNHxFuwUT 6Mxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=JzaahJRNOKDFit8f5Duv2SMo2t2sHzYN7/Bmlfac39g=; b=Mg13VeDIk/4A3mZ0r2egHBh9DlsFO2pyGinVKRQOzJ9OvhUz+ppphzdfH7ofJcFqkW Kkb1JEh492uokxNMf6Nh3n6nMCjOrg7MYu0Putdxqn2bjrruoW90rsB4H4BaXfDtWc89 DMCS375Gb5l6z224IE2n7qpPl/aLhKkKKsYQyX/zqNjv+DV3PITGtYInX4/0MPFltzzZ CcPvwJlmdRPYRAgjnAg+P1ui0egZnnrEZPAf3d/Ac1SU5ynBTLnkqrHtkL2gR6hSpis3 Pa1HjhAf/i3bD9SRPVaXxrRe2QQlcFKYH5u25usAl1Fy0iwVVIu/e8UtckY6zt8Jw6vp 6NmQ== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s138si9378074pfc.148.2019.06.09.22.38.43; Sun, 09 Jun 2019 22:38:58 -0700 (PDT) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387617AbfFJFhn (ORCPT + 99 others); Mon, 10 Jun 2019 01:37:43 -0400 Received: from inva021.nxp.com ([92.121.34.21]:37064 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387464AbfFJFhn (ORCPT ); Mon, 10 Jun 2019 01:37:43 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 7C3522006ED; Mon, 10 Jun 2019 07:37:41 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 08E19200148; Mon, 10 Jun 2019 07:37:35 +0200 (CEST) Received: from localhost.localdomain (mega.ap.freescale.net [10.192.208.232]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id B75DA402C0; Mon, 10 Jun 2019 13:37:26 +0800 (SGT) From: Anson.Huang@nxp.com To: mturquette@baylibre.com, sboyd@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, abel.vesa@nxp.com, l.stach@pengutronix.de, ccaione@baylibre.com, leonard.crestez@nxp.com, aisheng.dong@nxp.com, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH] clk: imx8mq: Use devm_platform_ioremap_resource() instead of of_iomap() Date: Mon, 10 Jun 2019 13:39:22 +0800 Message-Id: <20190610053922.30355-1-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.17.1 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Anson Huang i.MX8MQ clock driver uses platform driver model, better to use devm_platform_ioremap_resource() instead of of_iomap() to get IO base. Signed-off-by: Anson Huang --- drivers/clk/imx/clk-imx8mq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/clk/imx/clk-imx8mq.c b/drivers/clk/imx/clk-imx8mq.c index 1292241..7da1edb 100644 --- a/drivers/clk/imx/clk-imx8mq.c +++ b/drivers/clk/imx/clk-imx8mq.c @@ -361,9 +361,9 @@ static int imx8mq_clocks_probe(struct platform_device *pdev) clks[IMX8MQ_SYS2_PLL_1000M] = imx_clk_fixed_factor("sys2_pll_1000m", "sys2_pll_out", 1, 1); np = dev->of_node; - base = of_iomap(np, 0); - if (WARN_ON(!base)) - return -ENOMEM; + base = devm_platform_ioremap_resource(pdev, 0); + if (WARN_ON(IS_ERR(base))) + return PTR_ERR(base); /* CORE */ clks[IMX8MQ_CLK_A53_SRC] = imx_clk_mux2("arm_a53_src", base + 0x8000, 24, 3, imx8mq_a53_sels, ARRAY_SIZE(imx8mq_a53_sels)); -- 2.7.4