dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
To: dri-devel@lists.freedesktop.org
Cc: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>,
	Oded Gabbay <ogabbay@kernel.org>,
	Jeffrey Hugo <quic_jhugo@quicinc.com>,
	Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Subject: [PATCH 2/2] accel/ivpu: Compile ivpu_debugfs.c conditionally
Date: Thu,  7 Sep 2023 09:26:10 +0200	[thread overview]
Message-ID: <20230907072610.433497-2-stanislaw.gruszka@linux.intel.com> (raw)
In-Reply-To: <20230907072610.433497-1-stanislaw.gruszka@linux.intel.com>

Only compile ivpu_debugfs.c file with CONFIG_DEBUG_FS.

Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
---
 drivers/accel/ivpu/Makefile       | 3 ++-
 drivers/accel/ivpu/ivpu_debugfs.h | 4 ++++
 drivers/accel/ivpu/ivpu_drv.c     | 2 --
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/accel/ivpu/Makefile b/drivers/accel/ivpu/Makefile
index e4328b430564..95ff7ad16338 100644
--- a/drivers/accel/ivpu/Makefile
+++ b/drivers/accel/ivpu/Makefile
@@ -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 \
@@ -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
diff --git a/drivers/accel/ivpu/ivpu_debugfs.h b/drivers/accel/ivpu/ivpu_debugfs.h
index 76dbce139772..49ae9ea78287 100644
--- a/drivers/accel/ivpu/ivpu_debugfs.h
+++ b/drivers/accel/ivpu/ivpu_debugfs.h
@@ -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__ */
diff --git a/drivers/accel/ivpu/ivpu_drv.c b/drivers/accel/ivpu/ivpu_drv.c
index b6aaf9811355..7851ff7773ca 100644
--- a/drivers/accel/ivpu/ivpu_drv.c
+++ b/drivers/accel/ivpu/ivpu_drv.c
@@ -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) {
-- 
2.25.1


  reply	other threads:[~2023-09-07  7:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-07  7:26 [PATCH 1/2] accel/ivpu: Update debugfs to latest changes in DRM Stanislaw Gruszka
2023-09-07  7:26 ` Stanislaw Gruszka [this message]
2023-09-11 15:35   ` [PATCH 2/2] accel/ivpu: Compile ivpu_debugfs.c conditionally Jeffrey Hugo
2023-09-26  5:26   ` [PATCH 3/2] accel/ivpu: Use local variable for debugfs root Stanislaw Gruszka
2023-09-26 15:57     ` Jeffrey Hugo
2023-09-11 15:34 ` [PATCH 1/2] accel/ivpu: Update debugfs to latest changes in DRM Jeffrey Hugo
2023-09-27 11:16 ` Stanislaw Gruszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230907072610.433497-2-stanislaw.gruszka@linux.intel.com \
    --to=stanislaw.gruszka@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jacek.lawrynowicz@linux.intel.com \
    --cc=ogabbay@kernel.org \
    --cc=quic_jhugo@quicinc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox