dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/bridge: fix build with CONFIG_OF=n
@ 2025-05-22  7:12 Luca Ceresoli
  2025-05-22  7:58 ` Borah, Chaitanya Kumar
  0 siblings, 1 reply; 3+ messages in thread
From: Luca Ceresoli @ 2025-05-22  7:12 UTC (permalink / raw)
  To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
	Jonas Karlman, Jernej Skrabec, David Airlie, Simona Vetter,
	Ville Syrjala
  Cc: Thomas Petazzoni, dri-devel, linux-kernel, Luca Ceresoli

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 <ville.syrjala@linux.intel.com>
Closes: https://oftc.catirclogs.org/dri-devel/2025-05-21#34288266;
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
---
 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 464da28f9134f0fcece5c72a8c5fe7f3e42c7e3d..0af5db244db8580ea0c9af1d9a373b7bf62ee699 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,

---
base-commit: a3436f63aa4f93b043a970cc72a196a501191ecc
change-id: 20250522-devm_drm_put_bridge-fix-non-of-build-fbb67d28494c

Best regards,
-- 
Luca Ceresoli <luca.ceresoli@bootlin.com>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-05-22  9:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-22  7:12 [PATCH] drm/bridge: fix build with CONFIG_OF=n Luca Ceresoli
2025-05-22  7:58 ` Borah, Chaitanya Kumar
2025-05-22  9:22   ` Jani Nikula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).