]> git.karo-electronics.de Git - linux-beck.git/commitdiff
gpio: stp-xway: 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:43 +0000 (20:35 +0530)
Use devm_gpiochip_add_data() for GPIO registration.

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

index d11dd48570b24d0f1735e4a124f57aecc13961f2..19e654f88b3ab93373df113904850bea74faad40 100644 (file)
@@ -258,7 +258,7 @@ static int xway_stp_probe(struct platform_device *pdev)
 
        ret = xway_stp_hw_init(chip);
        if (!ret)
-               ret = gpiochip_add_data(&chip->gc, chip);
+               ret = devm_gpiochip_add_data(&pdev->dev, &chip->gc, chip);
 
        if (!ret)
                dev_info(&pdev->dev, "Init done\n");