linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pinctrl: spear: Convert to devm_ioremap_resource
@ 2013-08-26  0:20 Axel Lin
  2013-08-26  4:34 ` Viresh Kumar
  2013-08-28 11:19 ` Linus Walleij
  0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2013-08-26  0:20 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/pinctrl/spear/pinctrl-spear.c | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/drivers/pinctrl/spear/pinctrl-spear.c b/drivers/pinctrl/spear/pinctrl-spear.c
index 116da04..58bf686 100644
--- a/drivers/pinctrl/spear/pinctrl-spear.c
+++ b/drivers/pinctrl/spear/pinctrl-spear.c
@@ -367,21 +367,16 @@ int spear_pinctrl_probe(struct platform_device *pdev,
 	if (!machdata)
 		return -ENODEV;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res)
-		return -EINVAL;
-
 	pmx = devm_kzalloc(&pdev->dev, sizeof(*pmx), GFP_KERNEL);
 	if (!pmx) {
 		dev_err(&pdev->dev, "Can't alloc spear_pmx\n");
 		return -ENOMEM;
 	}
 
-	pmx->vbase = devm_ioremap(&pdev->dev, res->start, resource_size(res));
-	if (!pmx->vbase) {
-		dev_err(&pdev->dev, "Couldn't ioremap at index 0\n");
-		return -ENODEV;
-	}
+	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	pmx->vbase = devm_ioremap_resource(&pdev->dev, res);
+	if (IS_ERR(pmx->vbase))
+		return PTR_ERR(pmx->vbase);
 
 	pmx->dev = &pdev->dev;
 	pmx->machdata = machdata;
-- 
1.8.1.2

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

* [PATCH] pinctrl: spear: Convert to devm_ioremap_resource
  2013-08-26  0:20 [PATCH] pinctrl: spear: Convert to devm_ioremap_resource Axel Lin
@ 2013-08-26  4:34 ` Viresh Kumar
  2013-08-28 11:19 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Viresh Kumar @ 2013-08-26  4:34 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Aug 26, 2013 at 5:50 AM, Axel Lin <axel.lin@ingics.com> wrote:
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
>  drivers/pinctrl/spear/pinctrl-spear.c | 13 ++++---------
>  1 file changed, 4 insertions(+), 9 deletions(-)

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

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

* [PATCH] pinctrl: spear: Convert to devm_ioremap_resource
  2013-08-26  0:20 [PATCH] pinctrl: spear: Convert to devm_ioremap_resource Axel Lin
  2013-08-26  4:34 ` Viresh Kumar
@ 2013-08-28 11:19 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2013-08-28 11:19 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Aug 26, 2013 at 2:20 AM, Axel Lin <axel.lin@ingics.com> wrote:

> Signed-off-by: Axel Lin <axel.lin@ingics.com>

Patch applied with Viresh's ACK.

Yours,
Linus Walleij

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

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

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-26  0:20 [PATCH] pinctrl: spear: Convert to devm_ioremap_resource Axel Lin
2013-08-26  4:34 ` Viresh Kumar
2013-08-28 11:19 ` 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).