Skip to contentSkip to conversation

drm: of: fix build error without CONFIG_OF

PATCH New Chen Zhou 1 participant 1 message Dec 19, 2019

Subsystems (2)
lore
Share & tools
lore

Chen Zhou

author
#0 lore raw

PATCH 1/1 drm: of: fix build error without CONFIG_OF

Without CONFIG_OF, drm_of_lvds_get_dual_link_pixel_order should be static inline, otherwise building fails:

drivers/gpu/drm/vc4/vc4_dsi.o: In function `drm_of_lvds_get_dual_link_pixel_order':
vc4_dsi.c:(.text+0xa30): multiple definition of `drm_of_lvds_get_dual_link_pixel_order' drivers/gpu/drm/vc4/vc4_dpi.o:vc4_dpi.c:(.text+0x460): first defined here make[4]: *** [drivers/gpu/drm/vc4/vc4.o] Error 1
make[3]: *** [drivers/gpu/drm/vc4] Error 2
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [drivers/gpu/drm] Error 2
make[1]: *** [drivers/gpu] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [drivers] Error 2

Fixes 6529007522de (drm: of: Add drm_of_lvds_get_dual_link_pixel_order)
---
 include/drm/drm_of.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/drm/drm_of.h +1 -1
index 8ec7ca6..3398be9 100644
@@ -92,7 +92,7 @@ static inline int drm_of_find_panel_or_bridge(const struct device_node *np,
 	return -EINVAL;
 }
 
-int drm_of_lvds_get_dual_link_pixel_order(const struct device_node *port1,
+static inline int drm_of_lvds_get_dual_link_pixel_order(const struct device_node *port1,
 					  const struct device_node *port2)
 {
 	return -EINVAL;
Signature · 1 line
2.7.4