From ee1855582e5e0f8d73428875b91a30785bcc4b7c Mon Sep 17 00:00:00 2001 From: Luca Ceresoli Date: Thu, 22 May 2025 09:12:58 +0200 Subject: [PATCH] drm/bridge: fix build with CONFIG_OF=n MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Commit 5164553d739e ("drm/bridge: add devm_drm_put_bridge()") adds two declarations for devm_drm_put_bridge(): 1) an inline declaration in the #else branch of '#if defined(CONFIG_OF)...' 2) one outside of the same #if This results in a build failure with CONFIG_OF=n: ../drivers/gpu/drm/drm_bridge.c:1406:6: error: redefinition of ‘devm_drm_put_bridge’ The function has nothing to do with OF, thus fix by removing declaration 1. Fixes: 5164553d739e ("drm/bridge: add devm_drm_put_bridge()") Reported-by: Ville Syrjala Closes: https://oftc.catirclogs.org/dri-devel/2025-05-21#34288266; Tested-by: Chaitanya Kumar Borah Reviewed-by: Chaitanya Kumar Borah Link: https://lore.kernel.org/r/20250522-devm_drm_put_bridge-fix-non-of-build-v1-1-a05234dea046@bootlin.com Signed-off-by: Luca Ceresoli --- include/drm/drm_bridge.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h index 464da28f9134f..0af5db244db85 100644 --- a/include/drm/drm_bridge.h +++ b/include/drm/drm_bridge.h @@ -1311,8 +1311,6 @@ static inline struct drm_bridge *devm_drm_of_get_bridge(struct device *dev, return ERR_PTR(-ENODEV); } -static inline void devm_drm_put_bridge(struct device *dev, struct drm_bridge *bridge) {} - static inline struct drm_bridge *drmm_of_get_bridge(struct drm_device *drm, struct device_node *node, u32 port, -- 2.47.2