Skip to content

Commit 159c610

Browse files
Ye Xingchentsbogend
authored andcommitted
MIPS: ralink: Use devm_platform_get_and_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
1 parent 663bf6a commit 159c610

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

arch/mips/ralink/timer.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ static int rt_timer_enable(struct rt_timer *rt)
9595

9696
static int rt_timer_probe(struct platform_device *pdev)
9797
{
98-
struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
9998
struct rt_timer *rt;
10099
struct clk *clk;
101100

@@ -109,7 +108,7 @@ static int rt_timer_probe(struct platform_device *pdev)
109108
if (rt->irq < 0)
110109
return rt->irq;
111110

112-
rt->membase = devm_ioremap_resource(&pdev->dev, res);
111+
rt->membase = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
113112
if (IS_ERR(rt->membase))
114113
return PTR_ERR(rt->membase);
115114

0 commit comments

Comments
 (0)