mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
pinctrl: xway: use devm_gpiochip_add_data()
Avoid a gpiochip_free() and use standard functions. Cc: John Crispin <[email protected]> Cc: Pramod Gurav <[email protected]> Cc: Martin Schiller <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
parent
8c7a92dad1
commit
86ede3d41b
1 changed files with 2 additions and 3 deletions
|
|
@ -1724,9 +1724,9 @@ static int pinmux_xway_probe(struct platform_device *pdev)
|
|||
}
|
||||
xway_pctrl_desc.pins = xway_info.pads;
|
||||
|
||||
/* load the gpio chip */
|
||||
/* register the gpio chip */
|
||||
xway_chip.parent = &pdev->dev;
|
||||
ret = gpiochip_add(&xway_chip);
|
||||
ret = devm_gpiochip_add_data(&pdev->dev, &xway_chip, NULL);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "Failed to register gpio chip\n");
|
||||
return ret;
|
||||
|
|
@ -1749,7 +1749,6 @@ static int pinmux_xway_probe(struct platform_device *pdev)
|
|||
/* register with the generic lantiq layer */
|
||||
ret = ltq_pinctrl_register(pdev, &xway_info);
|
||||
if (ret) {
|
||||
gpiochip_remove(&xway_chip);
|
||||
dev_err(&pdev->dev, "Failed to register pinctrl driver\n");
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue