summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-timberdale.c
diff options
context:
space:
mode:
authorEnrico Weigelt, metux IT consult <info@metux.net>2019-03-11 19:55:13 +0100
committerLinus Walleij <linus.walleij@linaro.org>2019-04-04 19:04:28 +0200
commitaa6c9b91089b40d7efa411cec3de537f324debd8 (patch)
treee182eda9199af9a87e363584da4d946baeb3dc63 /drivers/gpio/gpio-timberdale.c
parentdrivers: gpio: tegra: use devm_platform_ioremap_resource() (diff)
downloadlinux-aa6c9b91089b40d7efa411cec3de537f324debd8.tar.xz
linux-aa6c9b91089b40d7efa411cec3de537f324debd8.zip
drivers: gpio: timberdale: 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>
Diffstat (limited to 'drivers/gpio/gpio-timberdale.c')
-rw-r--r--drivers/gpio/gpio-timberdale.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpio/gpio-timberdale.c b/drivers/gpio/gpio-timberdale.c
index 314e300d6ba3..1c70e831069c 100644
--- a/drivers/gpio/gpio-timberdale.c
+++ b/drivers/gpio/gpio-timberdale.c
@@ -229,7 +229,6 @@ static int timbgpio_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct gpio_chip *gc;
struct timbgpio *tgpio;
- struct resource *iomem;
struct timbgpio_platform_data *pdata = dev_get_platdata(&pdev->dev);
int irq = platform_get_irq(pdev, 0);
@@ -246,8 +245,7 @@ static int timbgpio_probe(struct platform_device *pdev)
spin_lock_init(&tgpio->lock);
- iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- tgpio->membase = devm_ioremap_resource(dev, iomem);
+ tgpio->membase = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(tgpio->membase))
return PTR_ERR(tgpio->membase);