From: Rosen Penev <rosenp@gmail.com>
To: linux-clk@vger.kernel.org
Cc: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Brian Masney <bmasney@redhat.com>,
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH] clk: lan966x: use devm_platform_ioremap_resource()
Date: Wed, 6 May 2026 16:35:32 -0700 [thread overview]
Message-ID: <20260506233532.176285-1-rosenp@gmail.com> (raw)
Use it as another instance is used above. This one is optional so treat
it as such.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/clk/clk-lan966x.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/clk/clk-lan966x.c b/drivers/clk/clk-lan966x.c
index 3c7a48c616bb..8c7b273eb756 100644
--- a/drivers/clk/clk-lan966x.c
+++ b/drivers/clk/clk-lan966x.c
@@ -253,7 +253,6 @@ static int lan966x_clk_probe(struct platform_device *pdev)
struct clk_hw_onecell_data *hw_data;
struct device *dev = &pdev->dev;
void __iomem *gate_base;
- struct resource *res;
int i, ret;
data = device_get_match_data(dev);
@@ -283,12 +282,8 @@ static int lan966x_clk_probe(struct platform_device *pdev)
}
}
- res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
- if (res) {
- gate_base = devm_ioremap_resource(&pdev->dev, res);
- if (IS_ERR(gate_base))
- return PTR_ERR(gate_base);
-
+ gate_base = devm_platform_ioremap_resource(pdev, 1);
+ if (!IS_ERR(gate_base)) {
hw_data->num = data->num_total_clks;
ret = lan966x_gate_clk_register(dev, data, hw_data, gate_base);
--
2.54.0
next reply other threads:[~2026-05-06 23:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-06 23:35 Rosen Penev [this message]
2026-05-07 22:47 ` [PATCH] clk: lan966x: use devm_platform_ioremap_resource() Brian Masney
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=20260506233532.176285-1-rosenp@gmail.com \
--to=rosenp@gmail.com \
--cc=bmasney@redhat.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.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