summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-loongson1.c
diff options
context:
space:
mode:
authorEnrico Weigelt, metux IT consult <info@metux.net>2019-03-11 19:54:56 +0100
committerLinus Walleij <linus.walleij@linaro.org>2019-04-04 19:04:26 +0200
commit62fe072a24e2a6520802cbc57bd2943e0ab8f640 (patch)
tree8364a927bd00daadbfeea6769e4fd64278747996 /drivers/gpio/gpio-loongson1.c
parentdrivers: gpio: janz-ttl: use devm_platform_ioremap_resource() (diff)
downloadlinux-62fe072a24e2a6520802cbc57bd2943e0ab8f640.tar.xz
linux-62fe072a24e2a6520802cbc57bd2943e0ab8f640.zip
drivers: gpio: loongon1: 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 '')
-rw-r--r--drivers/gpio/gpio-loongson1.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpio/gpio-loongson1.c b/drivers/gpio/gpio-loongson1.c
index fca84ccac35c..1b1ee94eeab4 100644
--- a/drivers/gpio/gpio-loongson1.c
+++ b/drivers/gpio/gpio-loongson1.c
@@ -47,15 +47,13 @@ static int ls1x_gpio_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct gpio_chip *gc;
- struct resource *res;
int ret;
gc = devm_kzalloc(dev, sizeof(*gc), GFP_KERNEL);
if (!gc)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- gpio_reg_base = devm_ioremap_resource(dev, res);
+ gpio_reg_base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(gpio_reg_base))
return PTR_ERR(gpio_reg_base);