summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinctrl-st.c
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2013-07-29 06:22:55 +0200
committerLinus Walleij <linus.walleij@linaro.org>2013-08-07 22:29:57 +0200
commit656445f3e24d7dbae284c534004961357c976c93 (patch)
tree6db0183d83c85b0ec9d6058724bceed9447f980f /drivers/pinctrl/pinctrl-st.c
parentpinctrl: imx: work around select input quirk (diff)
downloadlinux-656445f3e24d7dbae284c534004961357c976c93.tar.xz
linux-656445f3e24d7dbae284c534004961357c976c93.zip
pinctrl: st: Convert to use devm_ioremap_resource
devm_request_and_ioremap is deprecated. Use devm_ioremap_resource instead. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Srinivas Kandagatla <srinivas.kandagatla@st.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-st.c')
-rw-r--r--drivers/pinctrl/pinctrl-st.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c
index 04d4506ae18d..6246d7a41b15 100644
--- a/drivers/pinctrl/pinctrl-st.c
+++ b/drivers/pinctrl/pinctrl-st.c
@@ -1222,11 +1222,9 @@ static int st_gpiolib_register_bank(struct st_pinctrl *info,
if (of_address_to_resource(np, 0, &res))
return -ENODEV;
- bank->base = devm_request_and_ioremap(dev, &res);
- if (!bank->base) {
- dev_err(dev, "Can't get IO memory mapping!\n");
- return -ENODEV;
- }
+ bank->base = devm_ioremap_resource(dev, &res);
+ if (IS_ERR(bank->base))
+ return PTR_ERR(bank->base);
bank->gpio_chip = st_gpio_template;
bank->gpio_chip.base = bank_num * ST_GPIO_PINS_PER_BANK;