[PATCH] drm/etnaviv: add THERMAL dependency

Philipp Zabel p.zabel at pengutronix.de
Mon Oct 16 10:44:36 UTC 2017


The etnaviv driver causes a link failure if it is built-in but THERMAL
is built as a module:

drivers/gpu/drm/etnaviv/etnaviv_gpu.o: In function `etnaviv_gpu_bind':
etnaviv_gpu.c:(.text+0x4c4): undefined reference to `thermal_of_cooling_device_register'
etnaviv_gpu.c:(.text+0x600): undefined reference to `thermal_cooling_device_unregister'
drivers/gpu/drm/etnaviv/etnaviv_gpu.o: In function `etnaviv_gpu_unbind':
etnaviv_gpu.c:(.text+0x2aac): undefined reference to `thermal_cooling_device_unregister'

Add a Kconfig dependency on THERMAL to avoid this, but allow building
with THERMAL disabled altogether. In that case, IS_ENABLED checks in the
code will disable the cooling device registration.

Signed-off-by: Philipp Zabel <p.zabel at pengutronix.de>
---
 drivers/gpu/drm/etnaviv/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/etnaviv/Kconfig b/drivers/gpu/drm/etnaviv/Kconfig
index 38b477b5fbf9d..39e402e30262f 100644
--- a/drivers/gpu/drm/etnaviv/Kconfig
+++ b/drivers/gpu/drm/etnaviv/Kconfig
@@ -4,6 +4,7 @@ config DRM_ETNAVIV
 	depends on DRM
 	depends on ARCH_MXC || ARCH_DOVE || (ARM && COMPILE_TEST)
 	depends on MMU
+	depends on THERMAL || !THERMAL # if THERMAL=m, this can't be 'y'
 	select SHMEM
 	select SYNC_FILE
 	select TMPFS
-- 
2.11.0



More information about the etnaviv mailing list