@@ -1845,7 +1845,6 @@ static int xgene_edac_probe(struct platform_device *pdev)
{
struct xgene_edac *edac;
struct device_node *child;
- struct resource *res;
int rc;
edac = devm_kzalloc(&pdev->dev, sizeof(*edac), GFP_KERNEL);
@@ -1903,8 +1902,7 @@ static int xgene_edac_probe(struct platform_device *pdev)
edac->rb_map = NULL;
}
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- edac->pcp_csr = devm_ioremap_resource(&pdev->dev, res);
+ edac->pcp_csr = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(edac->pcp_csr)) {
dev_err(&pdev->dev, "no PCP resource address\n");
rc = PTR_ERR(edac->pcp_csr);