summaryrefslogtreecommitdiff
path: root/drivers/bus
diff options
context:
space:
mode:
authorYangtao Li <frank.li@vivo.com>2023-07-06 15:20:36 +0800
committerJernej Skrabec <jernej.skrabec@gmail.com>2023-07-31 00:49:38 +0200
commit01b76ae654da42c7ee5ffc7347bfafd6b6fd9dd9 (patch)
tree64c96a093f8cedd43c73461bf28eab137e75fcfc /drivers/bus
parent06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5 (diff)
bus: sunxi-rsb: Convert to devm_platform_ioremap_resource()
Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li <frank.li@vivo.com> Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com> Link: https://lore.kernel.org/r/20230706072042.31296-1-frank.li@vivo.com Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Diffstat (limited to 'drivers/bus')
-rw-r--r--drivers/bus/sunxi-rsb.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/bus/sunxi-rsb.c b/drivers/bus/sunxi-rsb.c
index 696c0aefb0ca..2aefd5dde3c9 100644
--- a/drivers/bus/sunxi-rsb.c
+++ b/drivers/bus/sunxi-rsb.c
@@ -746,7 +746,6 @@ static int sunxi_rsb_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct device_node *np = dev->of_node;
- struct resource *r;
struct sunxi_rsb *rsb;
u32 clk_freq = 3000000;
int irq, ret;
@@ -766,8 +765,7 @@ static int sunxi_rsb_probe(struct platform_device *pdev)
rsb->dev = dev;
rsb->clk_freq = clk_freq;
platform_set_drvdata(pdev, rsb);
- r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- rsb->regs = devm_ioremap_resource(dev, r);
+ rsb->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(rsb->regs))
return PTR_ERR(rsb->regs);