gpio: iop: Use devm_gpiochip_add_data() for gpio registration
authorLaxman Dewangan <ldewangan@nvidia.com>
Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)
committerLaxman Dewangan <ldewangan@nvidia.com>
Tue, 23 Feb 2016 15:05:32 +0000 (20:35 +0530)
Use devm_gpiochip_add_data() for GPIO registration.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
drivers/gpio/gpio-iop.c

index fb65e5850e0c1f67a31b00a678fb1a4b35ccf3de..860c535922fd184d929e1fda6a9fff2c9452622c 100644 (file)
@@ -114,7 +114,7 @@ static int iop3xx_gpio_probe(struct platform_device *pdev)
        if (IS_ERR(base))
                return PTR_ERR(base);
 
-       return gpiochip_add_data(&iop3xx_chip, NULL);
+       return devm_gpiochip_add_data(&pdev->dev, &iop3xx_chip, NULL);
 }
 
 static struct platform_driver iop3xx_gpio_driver = {