diff options
Diffstat (limited to 'drivers/pinctrl/pinctrl-tz1090-pdc.c')
-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 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) { |