Skip to content

Commit

Permalink
accel/ivpu: Compile ivpu_debugfs.c conditionally
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Stanislaw Gruszka committed Sep 27, 2023
1 parent c78199a commit d776f65
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion drivers/accel/ivpu/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# Copyright (C) 2023 Intel Corporation

intel_vpu-y := \
ivpu_debugfs.o \
ivpu_drv.o \
ivpu_fw.o \
ivpu_fw_log.o \
Expand All @@ -16,4 +15,6 @@ intel_vpu-y := \
ivpu_mmu_context.o \
ivpu_pm.o

intel_vpu-$(CONFIG_DEBUG_FS) += ivpu_debugfs.o

obj-$(CONFIG_DRM_ACCEL_IVPU) += intel_vpu.o
4 changes: 4 additions & 0 deletions drivers/accel/ivpu/ivpu_debugfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@

struct ivpu_device;

#if defined(CONFIG_DEBUG_FS)
void ivpu_debugfs_init(struct ivpu_device *vdev);
#else
static inline void ivpu_debugfs_init(struct ivpu_device *vdev) { }
#endif

#endif /* __IVPU_DEBUGFS_H__ */
2 changes: 0 additions & 2 deletions drivers/accel/ivpu/ivpu_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -627,9 +627,7 @@ static int ivpu_probe(struct pci_dev *pdev, const struct pci_device_id *id)
if (ret)
return ret;

#if defined(CONFIG_DEBUG_FS)
ivpu_debugfs_init(vdev);
#endif

ret = drm_dev_register(&vdev->drm, 0);
if (ret) {
Expand Down

0 comments on commit d776f65

Please sign in to comment.