* [PATCH] pinctrl: tegra: Convert to devm_ioremap_resource
@ 2013-08-26 2:17 Axel Lin
2013-08-26 15:59 ` Stephen Warren
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2013-08-26 2:17 UTC (permalink / raw)
To: Linus Walleij; +Cc: Stephen Warren, linux-tegra-u79uwXL29TY76Z2rM5mHXA
Signed-off-by: Axel Lin <axel.lin-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>
---
drivers/pinctrl/pinctrl-tegra.c | 22 +++-------------------
1 file changed, 3 insertions(+), 19 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-tegra.c b/drivers/pinctrl/pinctrl-tegra.c
index 637bcd3..be7e900 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,
for (i = 0; i < pmx->nbanks; i++) {
res = platform_get_resource(pdev, IORESOURCE_MEM, i);
- if (!res) {
- dev_err(&pdev->dev, "Missing MEM resource\n");
- return -ENODEV;
- }
-
- if (!devm_request_mem_region(&pdev->dev, res->start,
- resource_size(res),
- dev_name(&pdev->dev))) {
- dev_err(&pdev->dev,
- "Couldn't request MEM resource %d\n", i);
- return -ENODEV;
- }
-
- pmx->regs[i] = devm_ioremap(&pdev->dev, res->start,
- resource_size(res));
- if (!pmx->regs[i]) {
- dev_err(&pdev->dev, "Couldn't ioremap regs %d\n", i);
- return -ENODEV;
- }
+ pmx->regs[i] = devm_ioremap_resource(&pdev->dev, res);
+ if (IS_ERR(pmx->regs[i]))
+ return PTR_ERR(pmx->regs[i]);
}
pmx->pctl = pinctrl_register(&tegra_pinctrl_desc, &pdev->dev, pmx);
--
1.8.1.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] pinctrl: tegra: Convert to devm_ioremap_resource
2013-08-26 2:17 [PATCH] pinctrl: tegra: Convert to devm_ioremap_resource Axel Lin
@ 2013-08-26 15:59 ` Stephen Warren
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Warren @ 2013-08-26 15:59 UTC (permalink / raw)
To: Axel Lin; +Cc: Linus Walleij, linux-tegra-u79uwXL29TY76Z2rM5mHXA
On 08/25/2013 08:17 PM, Axel Lin wrote:
Patch description?
Acked-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-08-26 15:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-26 2:17 [PATCH] pinctrl: tegra: Convert to devm_ioremap_resource Axel Lin
2013-08-26 15:59 ` Stephen Warren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).