Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Axel Lin and committed by
Linus Walleij
f5ba9c52 6fc6c61c

+3 -19
+3 -19
drivers/pinctrl/pinctrl-tz1090-pdc.c
··· 949 949 tz1090_pdc_pinctrl_desc.npins = ARRAY_SIZE(tz1090_pdc_pins); 950 950 951 951 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 952 - if (!res) { 953 - dev_err(&pdev->dev, "Missing MEM resource\n"); 954 - return -ENODEV; 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 - } 952 + pmx->regs = devm_ioremap_resource(&pdev->dev, res); 953 + if (IS_ERR(pmx->regs)) 954 + return PTR_ERR(pmx->regs); 971 955 972 956 pmx->pctl = pinctrl_register(&tz1090_pdc_pinctrl_desc, &pdev->dev, pmx); 973 957 if (!pmx->pctl) {