summaryrefslogtreecommitdiff
path: root/include/drm/drm_of.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/drm/drm_of.h')
-rw-r--r--include/drm/drm_of.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/drm/drm_of.h b/include/drm/drm_of.h
index 7f0256dae3f1..f2f2bf82eff9 100644
--- a/include/drm/drm_of.h
+++ b/include/drm/drm_of.h
@@ -5,6 +5,7 @@
#include <linux/err.h>
#include <linux/of_graph.h>
#if IS_ENABLED(CONFIG_OF) && IS_ENABLED(CONFIG_DRM_PANEL_BRIDGE)
+#include <linux/of.h>
#include <drm/drm_bridge.h>
#endif
@@ -170,9 +171,12 @@ static inline int drm_of_panel_bridge_remove(const struct device_node *np,
if (!remote)
return -ENODEV;
- bridge = of_drm_find_bridge(remote);
+ bridge = of_drm_find_and_get_bridge(remote);
drm_panel_bridge_remove(bridge);
+ drm_bridge_put(bridge);
+ of_node_put(remote);
+
return 0;
#else
return -EINVAL;