gpio: xgene-sb: 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:
parent
c87dc4e46e
commit
29862059a5
|
@ -311,7 +311,7 @@ static int xgene_gpio_sb_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
priv->gc.irqdomain = priv->irq_domain;
|
priv->gc.irqdomain = priv->irq_domain;
|
||||||
|
|
||||||
ret = gpiochip_add_data(&priv->gc, priv);
|
ret = devm_gpiochip_add_data(&pdev->dev, &priv->gc, priv);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(&pdev->dev,
|
dev_err(&pdev->dev,
|
||||||
"failed to register X-Gene GPIO Standby driver\n");
|
"failed to register X-Gene GPIO Standby driver\n");
|
||||||
|
@ -339,7 +339,6 @@ static int xgene_gpio_sb_remove(struct platform_device *pdev)
|
||||||
|
|
||||||
irq_domain_remove(priv->irq_domain);
|
irq_domain_remove(priv->irq_domain);
|
||||||
|
|
||||||
gpiochip_remove(&priv->gc);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue