Skip to content

Commit b43340d

Browse files
zhang songyitsbogend
authored andcommitted
mips/pci: use devm_platform_ioremap_resource()
Use the devm_platform_ioremap_resource() helper instead of calling platform_get_resource() and devm_ioremap_resource() separately Signed-off-by: zhang songyi <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
1 parent 7c18b64 commit b43340d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

arch/mips/pci/pci-rt3883.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,6 @@ static int rt3883_pci_probe(struct platform_device *pdev)
404404
struct rt3883_pci_controller *rpc;
405405
struct device *dev = &pdev->dev;
406406
struct device_node *np = dev->of_node;
407-
struct resource *res;
408407
struct device_node *child;
409408
u32 val;
410409
int err;
@@ -414,8 +413,7 @@ static int rt3883_pci_probe(struct platform_device *pdev)
414413
if (!rpc)
415414
return -ENOMEM;
416415

417-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
418-
rpc->base = devm_ioremap_resource(dev, res);
416+
rpc->base = devm_platform_ioremap_resource(pdev, 0);
419417
if (IS_ERR(rpc->base))
420418
return PTR_ERR(rpc->base);
421419

0 commit comments

Comments
 (0)