[PATCH 3/4] drm: bridge: simple-bridge: use only devm* in probe
Marc Gonzalez
mgonzalez at freebox.fr
Mon Jun 17 16:03:01 UTC 2024
Once probe uses only devm functions, remove() becomes unnecessary.
Signed-off-by: Marc Gonzalez <mgonzalez at freebox.fr>
---
drivers/gpu/drm/bridge/simple-bridge.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/gpu/drm/bridge/simple-bridge.c b/drivers/gpu/drm/bridge/simple-bridge.c
index d672e34970e18..f1e458a15882f 100644
--- a/drivers/gpu/drm/bridge/simple-bridge.c
+++ b/drivers/gpu/drm/bridge/simple-bridge.c
@@ -214,16 +214,7 @@ static int simple_bridge_probe(struct platform_device *pdev)
sbridge->bridge.of_node = dev->of_node;
sbridge->bridge.timings = sbridge->info->timings;
- drm_bridge_add(&sbridge->bridge);
-
- return 0;
-}
-
-static void simple_bridge_remove(struct platform_device *pdev)
-{
- struct simple_bridge *sbridge = platform_get_drvdata(pdev);
-
- drm_bridge_remove(&sbridge->bridge);
+ return devm_drm_bridge_add(dev, &sbridge->bridge);
}
/*
@@ -300,7 +291,6 @@ MODULE_DEVICE_TABLE(of, simple_bridge_match);
static struct platform_driver simple_bridge_driver = {
.probe = simple_bridge_probe,
- .remove_new = simple_bridge_remove,
.driver = {
.name = "simple-bridge",
.of_match_table = simple_bridge_match,
--
2.34.1
More information about the dri-devel
mailing list