From: Yangtao Li <frank.li@vivo.com>
To: Manivannan Sadhasivam <mani@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>
Cc: Yangtao Li <frank.li@vivo.com>,
linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 04/13] clk: bm1880: Convert to devm_platform_ioremap_resource()
Date: Wed, 5 Jul 2023 14:53:04 +0800 [thread overview]
Message-ID: <20230705065313.67043-4-frank.li@vivo.com> (raw)
In-Reply-To: <20230705065313.67043-1-frank.li@vivo.com>
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/clk/clk-bm1880.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/clk/clk-bm1880.c b/drivers/clk/clk-bm1880.c
index 2a19e50fff68..a3814817ba86 100644
--- a/drivers/clk/clk-bm1880.c
+++ b/drivers/clk/clk-bm1880.c
@@ -876,16 +876,13 @@ static int bm1880_clk_probe(struct platform_device *pdev)
struct bm1880_clock_data *clk_data;
void __iomem *pll_base, *sys_base;
struct device *dev = &pdev->dev;
- struct resource *res;
int num_clks, i;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- pll_base = devm_ioremap_resource(&pdev->dev, res);
+ pll_base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(pll_base))
return PTR_ERR(pll_base);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
- sys_base = devm_ioremap_resource(&pdev->dev, res);
+ sys_base = devm_platform_ioremap_resource(pdev, 1);
if (IS_ERR(sys_base))
return PTR_ERR(sys_base);
--
2.39.0
next prev parent reply other threads:[~2023-07-05 6:54 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-05 6:53 [PATCH 01/13] clk: sunxi: sun9i-mmc: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-05 6:53 ` [PATCH 02/13] clk: actions: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-08-22 21:54 ` Stephen Boyd
2023-07-05 6:53 ` [PATCH 03/13] clk: axm5516: " Yangtao Li
2023-08-22 21:54 ` Stephen Boyd
2023-07-05 6:53 ` Yangtao Li [this message]
2023-08-22 21:54 ` [PATCH 04/13] clk: bm1880: " Stephen Boyd
2023-07-05 6:53 ` [PATCH 05/13] clk: fsl-sai: " Yangtao Li
2023-08-22 21:53 ` Stephen Boyd
2023-07-05 6:53 ` [PATCH 06/13] clk: gemini: " Yangtao Li
2023-08-22 21:53 ` Stephen Boyd
2023-07-05 6:53 ` [PATCH 07/13] clk: hsdk-pll: " Yangtao Li
2023-08-22 21:53 ` Stephen Boyd
2023-07-05 6:53 ` [PATCH 08/13] clk: imx: clk-imx8qxp-lpcg: " Yangtao Li
2023-07-25 7:30 ` Abel Vesa
2023-07-05 6:53 ` [PATCH 09/13] clk: mediatek: " Yangtao Li
2023-08-22 21:53 ` Stephen Boyd
2023-07-05 6:53 ` [PATCH 10/13] clk: ti: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-08-22 21:52 ` Stephen Boyd
2023-07-05 6:53 ` [PATCH 11/13] clk: socfpga: agilex: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-08-22 21:52 ` Stephen Boyd
2023-07-05 6:53 ` [PATCH 12/13] clk: nuvoton: " Yangtao Li
2023-07-05 7:57 ` Jacky Huang
2023-08-22 21:51 ` Stephen Boyd
2023-07-05 6:53 ` [PATCH 13/13] clk: mvebu: " Yangtao Li
2023-08-22 21:51 ` Stephen Boyd
2023-07-11 18:27 ` [PATCH 01/13] clk: sunxi: sun9i-mmc: Use devm_platform_get_and_ioremap_resource() Jernej Škrabec
2023-07-30 22:44 ` Jernej Škrabec
2023-08-14 10:09 ` Abel Vesa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230705065313.67043-4-frank.li@vivo.com \
--to=frank.li@vivo.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mani@kernel.org \
--cc=mturquette@baylibre.com \
--cc=sboyd@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®