aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pinctrl/pinctrl-tegra.c22
1 files changed, 3 insertions, 19 deletions
diff --git a/drivers/pinctrl/pinctrl-tegra.c b/drivers/pinctrl/pinctrl-tegra.c
index 637bcd341c7d..be7e900fb298 100644
--- a/drivers/pinctrl/pinctrl-tegra.c
+++ b/drivers/pinctrl/pinctrl-tegra.c
@@ -643,25 +643,9 @@ int tegra_pinctrl_probe(struct platform_device *pdev,
643 643
644 for (i = 0; i < pmx->nbanks; i++) { 644 for (i = 0; i < pmx->nbanks; i++) {
645 res = platform_get_resource(pdev, IORESOURCE_MEM, i); 645 res = platform_get_resource(pdev, IORESOURCE_MEM, i);
646 if (!res) { 646 pmx->regs[i] = devm_ioremap_resource(&pdev->dev, res);
647 dev_err(&pdev->dev, "Missing MEM resource\n"); 647 if (IS_ERR(pmx->regs[i]))
648 return -ENODEV; 648 return PTR_ERR(pmx->regs[i]);
649 }
650
651 if (!devm_request_mem_region(&pdev->dev, res->start,
652 resource_size(res),
653 dev_name(&pdev->dev))) {
654 dev_err(&pdev->dev,
655 "Couldn't request MEM resource %d\n", i);
656 return -ENODEV;
657 }
658
659 pmx->regs[i] = devm_ioremap(&pdev->dev, res->start,
660 resource_size(res));
661 if (!pmx->regs[i]) {
662 dev_err(&pdev->dev, "Couldn't ioremap regs %d\n", i);
663 return -ENODEV;
664 }
665 } 649 }
666 650
667 pmx->pctl = pinctrl_register(&tegra_pinctrl_desc, &pdev->dev, pmx); 651 pmx->pctl = pinctrl_register(&tegra_pinctrl_desc, &pdev->dev, pmx);