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

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

index 50fb09080a6b5c127445de370eec00ade0490bb1..7ffd164952867a870ff06c5120462b38cf6df928 100644 (file)
@@ -165,7 +165,7 @@ static int spics_gpio_probe(struct platform_device *pdev)
        spics->chip.owner = THIS_MODULE;
        spics->last_off = -1;
 
-       ret = gpiochip_add_data(&spics->chip, spics);
+       ret = devm_gpiochip_add_data(&pdev->dev, &spics->chip, spics);
        if (ret) {
                dev_err(&pdev->dev, "unable to add gpio chip\n");
                return ret;