Skip to content

Commit

Permalink
drm/bridge: Add stubs for devm_drm_of_get_bridge when OF is disabled
Browse files Browse the repository at this point in the history
If CONFIG_OF is disabled, devm_drm_of_get_bridge won't be compiled in
and drivers using that function will fail to build.

Add an inline stub so that we can still build-test those cases.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
Link: https://patchwork.freedesktop.org/patch/msgid/20210928181333.1176840-1-maxime@cerno.tech
  • Loading branch information
Maxime Ripard committed Sep 30, 2021
1 parent 49e7f76 commit 59050d7
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion include/drm/drm_bridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -919,9 +919,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

0 comments on commit 59050d7

Please sign in to comment.