[openwrt/openwrt] ath79: gpio-latch-mikrotik: remove _remove
LEDE Commits
lede-commits at lists.infradead.org
Wed Sep 25 13:57:02 PDT 2024
robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c4f2626694532f95d59cfd7e59a7505079846403
commit c4f2626694532f95d59cfd7e59a7505079846403
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Sat Sep 7 17:08:33 2024 -0700
ath79: gpio-latch-mikrotik: remove _remove
Not needed with devm.
Signed-off-by: Rosen Penev <rosenp at gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16350
Signed-off-by: Robert Marko <robimarko at gmail.com>
---
target/linux/ath79/files/drivers/gpio/gpio-latch-mikrotik.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/target/linux/ath79/files/drivers/gpio/gpio-latch-mikrotik.c b/target/linux/ath79/files/drivers/gpio/gpio-latch-mikrotik.c
index 80c3cc6748..de953e0b65 100644
--- a/target/linux/ath79/files/drivers/gpio/gpio-latch-mikrotik.c
+++ b/target/linux/ath79/files/drivers/gpio/gpio-latch-mikrotik.c
@@ -155,17 +155,7 @@ static int gpio_latch_probe(struct platform_device *pdev)
gc->direction_output = gpio_latch_direction_output;
gc->fwnode = fwnode;
- platform_set_drvdata(pdev, glc);
-
- return gpiochip_add(&glc->gc);
-}
-
-static int gpio_latch_remove(struct platform_device *pdev)
-{
- struct gpio_latch_chip *glc = platform_get_drvdata(pdev);
-
- gpiochip_remove(&glc->gc);
- return 0;
+ return devm_gpiochip_add_data(dev, gc, glc);
}
static const struct of_device_id gpio_latch_match[] = {
@@ -177,7 +167,6 @@ MODULE_DEVICE_TABLE(of, gpio_latch_match);
static struct platform_driver gpio_latch_driver = {
.probe = gpio_latch_probe,
- .remove = gpio_latch_remove,
.driver = {
.name = GPIO_LATCH_DRIVER_NAME,
.owner = THIS_MODULE,
More information about the lede-commits
mailing list