gpio: tegra: 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:46 +0000 (20:35 +0530)
Use devm_gpiochip_add_data() for GPIO registration.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
drivers/gpio/gpio-tegra.c

index 9a1a7e2ef38857c1f7f6e4ff4f352f17ce4751aa..790bb111b2cbd49a52d67c80c83a357cb87a40ac 100644 (file)
@@ -545,7 +545,7 @@ static int tegra_gpio_probe(struct platform_device *pdev)
 
        tegra_gpio_chip.of_node = pdev->dev.of_node;
 
-       ret = gpiochip_add_data(&tegra_gpio_chip, NULL);
+       ret = devm_gpiochip_add_data(&pdev->dev, &tegra_gpio_chip, NULL);
        if (ret < 0) {
                irq_domain_remove(irq_domain);
                return ret;