X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=drivers%2Fpinctrl%2Fpinctrl-xway.c;h=ae8f3a02ed97c8428e7a13c7ba2e1894c7e6f5d8;hb=9e0c1fb29a7c257a31c321c2437617b6b4d66168;hp=ad90984ec5008a7f39f64e6a498102af13cba583;hpb=e61ac0b05c53f5b56f3ea623c215437c09d8265b;p=karo-tx-linux.git diff --git a/drivers/pinctrl/pinctrl-xway.c b/drivers/pinctrl/pinctrl-xway.c index ad90984ec500..ae8f3a02ed97 100644 --- a/drivers/pinctrl/pinctrl-xway.c +++ b/drivers/pinctrl/pinctrl-xway.c @@ -9,6 +9,7 @@ * Copyright (C) 2012 John Crispin */ +#include #include #include #include @@ -674,7 +675,7 @@ static const struct of_device_id xway_match[] = { }; MODULE_DEVICE_TABLE(of, xway_match); -static int __devinit pinmux_xway_probe(struct platform_device *pdev) +static int pinmux_xway_probe(struct platform_device *pdev) { const struct of_device_id *match; const struct pinctrl_xway_soc *xway_soc; @@ -687,11 +688,9 @@ static int __devinit pinmux_xway_probe(struct platform_device *pdev) dev_err(&pdev->dev, "Failed to get resource\n"); return -ENOENT; } - xway_info.membase[0] = devm_request_and_ioremap(&pdev->dev, res); - if (!xway_info.membase[0]) { - dev_err(&pdev->dev, "Failed to remap resource\n"); - return -ENOMEM; - } + xway_info.membase[0] = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(xway_info.membase[0])) + return PTR_ERR(xway_info.membase[0]); match = of_match_device(xway_match, &pdev->dev); if (match)