diff options
author | Axel Lin <axel.lin@ingics.com> | 2013-08-25 22:21:44 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-08-28 07:34:19 -0400 |
commit | 6fc6c61c999012fe9b31bf94634679d80a42570a (patch) | |
tree | 3ab69459b1df22340cdfcca8055799b6fcb9734d | |
parent | 394a8ff8bb260cc3a39f67b7f3dbf05c95174257 (diff) |
pinctrl: tz1090: Convert to devm_ioremap_resource
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r-- | drivers/pinctrl/pinctrl-tz1090.c | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/drivers/pinctrl/pinctrl-tz1090.c b/drivers/pinctrl/pinctrl-tz1090.c index 4edae08a0a61..72d955252e41 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) | |||
1996 | tz1090_pinctrl_desc.npins = ARRAY_SIZE(tz1090_pins); | 1996 | tz1090_pinctrl_desc.npins = ARRAY_SIZE(tz1090_pins); |
1997 | 1997 | ||
1998 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 1998 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
1999 | if (!res) { | 1999 | pmx->regs = devm_ioremap_resource(&pdev->dev, res); |
2000 | dev_err(&pdev->dev, "Missing MEM resource\n"); | 2000 | if (IS_ERR(pmx->regs)) |
2001 | return -ENODEV; | 2001 | return PTR_ERR(pmx->regs); |
2002 | } | ||
2003 | |||
2004 | if (!devm_request_mem_region(&pdev->dev, res->start, | ||
2005 | resource_size(res), | ||
2006 | dev_name(&pdev->dev))) { | ||
2007 | dev_err(&pdev->dev, | ||
2008 | "Couldn't request MEM resource\n"); | ||
2009 | return -ENODEV; | ||
2010 | } | ||
2011 | |||
2012 | pmx->regs = devm_ioremap(&pdev->dev, res->start, | ||
2013 | resource_size(res)); | ||
2014 | if (!pmx->regs) { | ||
2015 | dev_err(&pdev->dev, "Couldn't ioremap regs\n"); | ||
2016 | return -ENODEV; | ||
2017 | } | ||
2018 | 2002 | ||
2019 | pmx->pctl = pinctrl_register(&tz1090_pinctrl_desc, &pdev->dev, pmx); | 2003 | pmx->pctl = pinctrl_register(&tz1090_pinctrl_desc, &pdev->dev, pmx); |
2020 | if (!pmx->pctl) { | 2004 | if (!pmx->pctl) { |