diff options
author | Enrico Weigelt, metux IT consult <info@metux.net> | 2019-03-11 22:48:21 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2019-04-04 20:04:27 +0300 |
commit | 037ae5bc377859916a298c8656d56bb034e8d219 (patch) | |
tree | bcbb161af2f2195c52eefcf918f1d4776bf9b862 | |
parent | 123ac0e5356cebb7b1bc51d5fb141a74d0a9db43 (diff) | |
download | linux-037ae5bc377859916a298c8656d56bb034e8d219.tar.xz |
drivers: gpio: octeon: use devm_platform_ioremap_resource()
Use the new helper that wraps the calls to platform_get_resource()
and devm_ioremap_resource() together.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r-- | drivers/gpio/gpio-octeon.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpio/gpio-octeon.c b/drivers/gpio/gpio-octeon.c index 1b19c88ea7bb..afb0e8a791e5 100644 --- a/drivers/gpio/gpio-octeon.c +++ b/drivers/gpio/gpio-octeon.c @@ -82,7 +82,6 @@ static int octeon_gpio_probe(struct platform_device *pdev) { struct octeon_gpio *gpio; struct gpio_chip *chip; - struct resource *res_mem; void __iomem *reg_base; int err = 0; @@ -91,8 +90,7 @@ static int octeon_gpio_probe(struct platform_device *pdev) return -ENOMEM; chip = &gpio->chip; - res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - reg_base = devm_ioremap_resource(&pdev->dev, res_mem); + reg_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(reg_base)) return PTR_ERR(reg_base); |