Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpio: ts4800: Use devm_gpiochip_add_data() for gpio registration

Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>

+1 -11
+1 -11
drivers/gpio/gpio-ts4800.c
··· 60 60 61 61 platform_set_drvdata(pdev, chip); 62 62 63 - return gpiochip_add_data(chip, NULL); 64 - } 65 - 66 - static int ts4800_gpio_remove(struct platform_device *pdev) 67 - { 68 - struct gpio_chip *chip = platform_get_drvdata(pdev); 69 - 70 - gpiochip_remove(chip); 71 - 72 - return 0; 63 + return devm_gpiochip_add_data(&pdev->dev, chip, NULL); 73 64 } 74 65 75 66 static const struct of_device_id ts4800_gpio_of_match[] = { ··· 74 83 .of_match_table = ts4800_gpio_of_match, 75 84 }, 76 85 .probe = ts4800_gpio_probe, 77 - .remove = ts4800_gpio_remove, 78 86 }; 79 87 80 88 module_platform_driver_probe(ts4800_gpio_driver, ts4800_gpio_probe);