From: Laxman Dewangan Date: Mon, 22 Feb 2016 12:13:28 +0000 (+0530) Subject: gpio: stp-xway: Use devm_gpiochip_add_data() for gpio registration X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1a20cb2d7da02d13888fb3bd8a5dc7b2a8be3181;p=linux-beck.git gpio: stp-xway: Use devm_gpiochip_add_data() for gpio registration Use devm_gpiochip_add_data() for GPIO registration. Signed-off-by: Laxman Dewangan --- diff --git a/drivers/gpio/gpio-stp-xway.c b/drivers/gpio/gpio-stp-xway.c index d11dd48570b2..19e654f88b3a 100644 --- a/drivers/gpio/gpio-stp-xway.c +++ b/drivers/gpio/gpio-stp-xway.c @@ -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");