linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] pinctrl: tz1090: Convert to devm_ioremap_resource
@ 2013-08-26  2:21 Axel Lin
  2013-08-26  2:22 ` [PATCH 2/2] pinctrl: tz1090-pdc: " Axel Lin
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Axel Lin @ 2013-08-26  2:21 UTC (permalink / raw)
  To: Linus Walleij; +Cc: James Hogan, linux-tegra-u79uwXL29TY76Z2rM5mHXA

Signed-off-by: Axel Lin <axel.lin-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>
---
 drivers/pinctrl/pinctrl-tz1090.c | 22 +++-------------------
 1 file changed, 3 insertions(+), 19 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-tz1090.c b/drivers/pinctrl/pinctrl-tz1090.c
index 4edae08..72d9552 100644
--- a/drivers/pinctrl/pinctrl-tz1090.c
+++ b/drivers/pinctrl/pinctrl-tz1090.c
@@ -1996,25 +1996,9 @@ static int tz1090_pinctrl_probe(struct platform_device *pdev)
 	tz1090_pinctrl_desc.npins = ARRAY_SIZE(tz1090_pins);
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	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\n");
-		return -ENODEV;
-	}
-
-	pmx->regs = devm_ioremap(&pdev->dev, res->start,
-				 resource_size(res));
-	if (!pmx->regs) {
-		dev_err(&pdev->dev, "Couldn't ioremap regs\n");
-		return -ENODEV;
-	}
+	pmx->regs = devm_ioremap_resource(&pdev->dev, res);
+	if (IS_ERR(pmx->regs))
+		return PTR_ERR(pmx->regs);
 
 	pmx->pctl = pinctrl_register(&tz1090_pinctrl_desc, &pdev->dev, pmx);
 	if (!pmx->pctl) {
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] pinctrl: tz1090-pdc: Convert to devm_ioremap_resource
  2013-08-26  2:21 [PATCH 1/2] pinctrl: tz1090: Convert to devm_ioremap_resource Axel Lin
@ 2013-08-26  2:22 ` Axel Lin
  2013-08-27  9:24   ` James Hogan
  2013-08-28 11:24   ` Linus Walleij
  2013-08-27  9:23 ` [PATCH 1/2] pinctrl: tz1090: " James Hogan
  2013-08-28 11:23 ` Linus Walleij
  2 siblings, 2 replies; 6+ messages in thread
From: Axel Lin @ 2013-08-26  2:22 UTC (permalink / raw)
  To: Linus Walleij; +Cc: James Hogan, linux-tegra-u79uwXL29TY76Z2rM5mHXA

Signed-off-by: Axel Lin <axel.lin-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>
---
 drivers/pinctrl/pinctrl-tz1090-pdc.c | 22 +++-------------------
 1 file changed, 3 insertions(+), 19 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-tz1090-pdc.c b/drivers/pinctrl/pinctrl-tz1090-pdc.c
index d4f12cc..494ad4b 100644
--- a/drivers/pinctrl/pinctrl-tz1090-pdc.c
+++ b/drivers/pinctrl/pinctrl-tz1090-pdc.c
@@ -949,25 +949,9 @@ static int tz1090_pdc_pinctrl_probe(struct platform_device *pdev)
 	tz1090_pdc_pinctrl_desc.npins = ARRAY_SIZE(tz1090_pdc_pins);
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	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\n");
-		return -ENODEV;
-	}
-
-	pmx->regs = devm_ioremap(&pdev->dev, res->start,
-				 resource_size(res));
-	if (!pmx->regs) {
-		dev_err(&pdev->dev, "Couldn't ioremap regs\n");
-		return -ENODEV;
-	}
+	pmx->regs = devm_ioremap_resource(&pdev->dev, res);
+	if (IS_ERR(pmx->regs))
+		return PTR_ERR(pmx->regs);
 
 	pmx->pctl = pinctrl_register(&tz1090_pdc_pinctrl_desc, &pdev->dev, pmx);
 	if (!pmx->pctl) {
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] pinctrl: tz1090: Convert to devm_ioremap_resource
  2013-08-26  2:21 [PATCH 1/2] pinctrl: tz1090: Convert to devm_ioremap_resource Axel Lin
  2013-08-26  2:22 ` [PATCH 2/2] pinctrl: tz1090-pdc: " Axel Lin
@ 2013-08-27  9:23 ` James Hogan
  2013-08-28 11:23 ` Linus Walleij
  2 siblings, 0 replies; 6+ messages in thread
From: James Hogan @ 2013-08-27  9:23 UTC (permalink / raw)
  To: Axel Lin; +Cc: Linus Walleij, linux-tegra-u79uwXL29TY76Z2rM5mHXA

On 26/08/13 03:21, Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>

Acked-by: James Hogan <james.hogan-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>

Thanks
James

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] pinctrl: tz1090-pdc: Convert to devm_ioremap_resource
  2013-08-26  2:22 ` [PATCH 2/2] pinctrl: tz1090-pdc: " Axel Lin
@ 2013-08-27  9:24   ` James Hogan
  2013-08-28 11:24   ` Linus Walleij
  1 sibling, 0 replies; 6+ messages in thread
From: James Hogan @ 2013-08-27  9:24 UTC (permalink / raw)
  To: Axel Lin; +Cc: Linus Walleij, linux-tegra-u79uwXL29TY76Z2rM5mHXA

On 26/08/13 03:22, Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>

Acked-by: James Hogan <james.hogan-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>

Thanks
James

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] pinctrl: tz1090: Convert to devm_ioremap_resource
  2013-08-26  2:21 [PATCH 1/2] pinctrl: tz1090: Convert to devm_ioremap_resource Axel Lin
  2013-08-26  2:22 ` [PATCH 2/2] pinctrl: tz1090-pdc: " Axel Lin
  2013-08-27  9:23 ` [PATCH 1/2] pinctrl: tz1090: " James Hogan
@ 2013-08-28 11:23 ` Linus Walleij
  2 siblings, 0 replies; 6+ messages in thread
From: Linus Walleij @ 2013-08-28 11:23 UTC (permalink / raw)
  To: Axel Lin; +Cc: James Hogan, linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

On Mon, Aug 26, 2013 at 4:21 AM, Axel Lin <axel.lin-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org> wrote:

> Signed-off-by: Axel Lin <axel.lin-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>

Patch applied with James' ACK.

Thanks!
Linus Walleij

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] pinctrl: tz1090-pdc: Convert to devm_ioremap_resource
  2013-08-26  2:22 ` [PATCH 2/2] pinctrl: tz1090-pdc: " Axel Lin
  2013-08-27  9:24   ` James Hogan
@ 2013-08-28 11:24   ` Linus Walleij
  1 sibling, 0 replies; 6+ messages in thread
From: Linus Walleij @ 2013-08-28 11:24 UTC (permalink / raw)
  To: Axel Lin; +Cc: James Hogan, linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

On Mon, Aug 26, 2013 at 4:22 AM, Axel Lin <axel.lin-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org> wrote:

> Signed-off-by: Axel Lin <axel.lin-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>

Patch applied with James' ACK.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-08-28 11:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-26  2:21 [PATCH 1/2] pinctrl: tz1090: Convert to devm_ioremap_resource Axel Lin
2013-08-26  2:22 ` [PATCH 2/2] pinctrl: tz1090-pdc: " Axel Lin
2013-08-27  9:24   ` James Hogan
2013-08-28 11:24   ` Linus Walleij
2013-08-27  9:23 ` [PATCH 1/2] pinctrl: tz1090: " James Hogan
2013-08-28 11:23 ` Linus Walleij

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).