gpio: moxart: Use devm_gpiochip_add_data() for gpio registration

Use devm_gpiochip_add_data() for GPIO registration.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
This commit is contained in:
Laxman Dewangan 2016-02-22 17:43:28 +05:30
parent 7d645df05a
commit 33bde5c503

View 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);