summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2022-09-05 14:04:29 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2022-09-05 14:04:29 +0000
commitb314ffdbe3863185a0c904632c6214e37f1fbd38 (patch)
tree80921fa2e6bf433fcf227f2305f33e29cff4fba3 /sys/dev
parent89edbcba2c8d73917033e3257e475f6aa2c3d2e2 (diff)
drm/bridge: Add stubs for devm_drm_of_get_bridge when OF is disabled
From Maxime Ripard f8b07c05b69969c41efafda7022d6cb184d61bf9 in linux 5.15.y/5.15.65 59050d783848d9b62e9d8fb6ce0cd00771c2bf87 in mainline linux
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/drm/include/drm/drm_bridge.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/include/drm/drm_bridge.h b/sys/dev/pci/drm/include/drm/drm_bridge.h
index ef83ce8c3d7..ab044e83ea2 100644
--- a/sys/dev/pci/drm/include/drm/drm_bridge.h
+++ b/sys/dev/pci/drm/include/drm/drm_bridge.h
@@ -911,9 +911,20 @@ struct drm_bridge *devm_drm_panel_bridge_add(struct device *dev,
struct drm_bridge *devm_drm_panel_bridge_add_typed(struct device *dev,
struct drm_panel *panel,
u32 connector_type);
+struct drm_connector *drm_panel_bridge_connector(struct drm_bridge *bridge);
+#endif
+
+#if defined(CONFIG_OF) && defined(CONFIG_DRM_PANEL_BRIDGE)
struct drm_bridge *devm_drm_of_get_bridge(struct device *dev, struct device_node *node,
u32 port, u32 endpoint);
-struct drm_connector *drm_panel_bridge_connector(struct drm_bridge *bridge);
+#else
+static inline struct drm_bridge *devm_drm_of_get_bridge(struct device *dev,
+ struct device_node *node,
+ u32 port,
+ u32 endpoint)
+{
+ return ERR_PTR(-ENODEV);
+}
#endif
#endif