summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEnrico Weigelt, metux IT consult <info@metux.net>2019-03-11 19:55:19 +0100
committerLinus Walleij <linus.walleij@linaro.org>2019-04-04 19:04:28 +0200
commit8d86f985ac4118cf3ea6168cd593c8fd96a1d83d (patch)
treed01a1db5a9e961037e75a402fd77d409e1b64680
parentdrivers: gpio: xgene-sb: use devm_platform_ioremap_resource() (diff)
downloadlinux-8d86f985ac4118cf3ea6168cd593c8fd96a1d83d.tar.xz
linux-8d86f985ac4118cf3ea6168cd593c8fd96a1d83d.zip
drivers: gpio: zx: 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-zx.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpio/gpio-zx.c b/drivers/gpio/gpio-zx.c
index 5eacad9b2692..fb927559aefa 100644
--- a/drivers/gpio/gpio-zx.c
+++ b/drivers/gpio/gpio-zx.c
@@ -218,15 +218,13 @@ static int zx_gpio_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct zx_gpio *chip;
- struct resource *res;
int irq, id, ret;
chip = devm_kzalloc(dev, sizeof(*chip), GFP_KERNEL);
if (!chip)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- chip->base = devm_ioremap_resource(dev, res);
+ chip->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(chip->base))
return PTR_ERR(chip->base);