aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2013-08-25 22:22:31 -0400
committerLinus Walleij <linus.walleij@linaro.org>2013-08-28 07:34:19 -0400
commitf5ba9c52bf1e236c4698c240955e5f119db62a28 (patch)
tree9389c33f708edd8e9db01adf8ee39fcf66fc55ee /drivers/pinctrl
parent6fc6c61c999012fe9b31bf94634679d80a42570a (diff)
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.c22
1 files changed, 3 insertions, 19 deletions
diff --git a/drivers/pinctrl/pinctrl-tz1090-pdc.c b/drivers/pinctrl/pinctrl-tz1090-pdc.c
index d4f12cc556b4..494ad4b83264 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)
949 tz1090_pdc_pinctrl_desc.npins = ARRAY_SIZE(tz1090_pdc_pins); 949 tz1090_pdc_pinctrl_desc.npins = ARRAY_SIZE(tz1090_pdc_pins);
950 950
951 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 951 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
952 if (!res) { 952 pmx->regs = devm_ioremap_resource(&pdev->dev, res);
953 dev_err(&pdev->dev, "Missing MEM resource\n"); 953 if (IS_ERR(pmx->regs))
954 return -ENODEV; 954 return PTR_ERR(pmx->regs);
955 }
956
957 if (!devm_request_mem_region(&pdev->dev, res->start,
958 resource_size(res),
959 dev_name(&pdev->dev))) {
960 dev_err(&pdev->dev,
961 "Couldn't request MEM resource\n");
962 return -ENODEV;
963 }
964
965 pmx->regs = devm_ioremap(&pdev->dev, res->start,
966 resource_size(res));
967 if (!pmx->regs) {
968 dev_err(&pdev->dev, "Couldn't ioremap regs\n");
969 return -ENODEV;
970 }
971 955
972 pmx->pctl = pinctrl_register(&tz1090_pdc_pinctrl_desc, &pdev->dev, pmx); 956 pmx->pctl = pinctrl_register(&tz1090_pdc_pinctrl_desc, &pdev->dev, pmx);
973 if (!pmx->pctl) { 957 if (!pmx->pctl) {