diff options
author | Axel Lin <axel.lin@ingics.com> | 2013-08-26 10:22:31 +0800 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-08-28 13:34:19 +0200 |
commit | f5ba9c52bf1e236c4698c240955e5f119db62a28 (patch) | |
tree | 9389c33f708edd8e9db01adf8ee39fcf66fc55ee /drivers/pinctrl | |
parent | 6fc6c61c999012fe9b31bf94634679d80a42570a (diff) | |
download | op-kernel-dev-f5ba9c52bf1e236c4698c240955e5f119db62a28.zip op-kernel-dev-f5ba9c52bf1e236c4698c240955e5f119db62a28.tar.gz |
pinctrl: tz1090-pdc: 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>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/pinctrl-tz1090-pdc.c | 22 |
1 files 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) { |