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

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

index cbbec838a9d1b1c383788a7b22cfa16563d6305d..8650b2916f874c8b1285e3f8fee4ae62ce954631 100644 (file)
@@ -89,7 +89,7 @@ static int __init gef_gpio_probe(struct platform_device *pdev)
        gc->of_node = pdev->dev.of_node;
 
        /* This function adds a memory mapped GPIO chip */
-       ret = gpiochip_add_data(gc, NULL);
+       ret = devm_gpiochip_add_data(&pdev->dev, gc, NULL);
        if (ret)
                goto err0;