Skip to content

Commit 50bf025

Browse files
YueHaibingjbrun3t
authored andcommitted
clk: meson: axg-audio: use devm_platform_ioremap_resource() to simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing <[email protected]> Signed-off-by: Jerome Brunet <[email protected]>
1 parent be4fe44 commit 50bf025

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/clk/meson/axg-audio.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1632,7 +1632,6 @@ static int axg_audio_clkc_probe(struct platform_device *pdev)
16321632
const struct audioclk_data *data;
16331633
struct axg_audio_reset_data *rst;
16341634
struct regmap *map;
1635-
struct resource *res;
16361635
void __iomem *regs;
16371636
struct clk_hw *hw;
16381637
int ret, i;
@@ -1641,8 +1640,7 @@ static int axg_audio_clkc_probe(struct platform_device *pdev)
16411640
if (!data)
16421641
return -EINVAL;
16431642

1644-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1645-
regs = devm_ioremap_resource(dev, res);
1643+
regs = devm_platform_ioremap_resource(pdev, 0);
16461644
if (IS_ERR(regs))
16471645
return PTR_ERR(regs);
16481646

0 commit comments

Comments
 (0)