OSDN Git Service

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

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

index ca60453..869002b 100644 (file)
@@ -63,7 +63,7 @@ static int moxart_gpio_probe(struct platform_device *pdev)
        gc->parent = dev;
        gc->owner = THIS_MODULE;
 
-       ret = gpiochip_add_data(gc, NULL);
+       ret = devm_gpiochip_add_data(dev, gc, NULL);
        if (ret) {
                dev_err(dev, "%s: gpiochip_add failed\n",
                        dev->of_node->full_name);