Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

accel/ivpu: Compile ivpu_debugfs.c conditionally

Only compile ivpu_debugfs.c file with CONFIG_DEBUG_FS.

Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230907072610.433497-2-stanislaw.gruszka@linux.intel.com

+6 -3
+2 -1
drivers/accel/ivpu/Makefile
··· 2 2 # Copyright (C) 2023 Intel Corporation 3 3 4 4 intel_vpu-y := \ 5 - ivpu_debugfs.o \ 6 5 ivpu_drv.o \ 7 6 ivpu_fw.o \ 8 7 ivpu_fw_log.o \ ··· 14 15 ivpu_mmu.o \ 15 16 ivpu_mmu_context.o \ 16 17 ivpu_pm.o 18 + 19 + intel_vpu-$(CONFIG_DEBUG_FS) += ivpu_debugfs.o 17 20 18 21 obj-$(CONFIG_DRM_ACCEL_IVPU) += intel_vpu.o
+4
drivers/accel/ivpu/ivpu_debugfs.h
··· 8 8 9 9 struct ivpu_device; 10 10 11 + #if defined(CONFIG_DEBUG_FS) 11 12 void ivpu_debugfs_init(struct ivpu_device *vdev); 13 + #else 14 + static inline void ivpu_debugfs_init(struct ivpu_device *vdev) { } 15 + #endif 12 16 13 17 #endif /* __IVPU_DEBUGFS_H__ */
-2
drivers/accel/ivpu/ivpu_drv.c
··· 627 627 if (ret) 628 628 return ret; 629 629 630 - #if defined(CONFIG_DEBUG_FS) 631 630 ivpu_debugfs_init(vdev); 632 - #endif 633 631 634 632 ret = drm_dev_register(&vdev->drm, 0); 635 633 if (ret) {