Skip to contentSkip to conversation

drm/i915: only build i915_debugfs.c when CONFIG_DEBUG_FS is enabled

PATCH Applied Jani Nikula 2 participants 2 messages Dec 16, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: only build i915_debugfs.c when CONFIG_DEBUG_FS is enabled

The whole file is wrapped around in #if defined(CONFIG_DEBUG_FS) anyway, so skip the file at the build level already.

---
 drivers/gpu/drm/i915/Makefile       |    3 ++-
 drivers/gpu/drm/i915/i915_debugfs.c |    4 ----
 2 files changed, 2 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/Makefile +2 -1
index 41838eaa799c..da682cbcb806 100644
@@ -4,7 +4,6 @@
 
 ccflags-y := -Iinclude/drm
 i915-y := i915_drv.o i915_dma.o i915_irq.o \
-	  i915_debugfs.o \
 	  i915_gpu_error.o \
           i915_suspend.o \
 	  i915_gem.o \
@@ -55,6 +54,8 @@ i915-$(CONFIG_ACPI)	+= intel_acpi.o
 
 i915-$(CONFIG_DRM_I915_FBDEV) += intel_fbdev.o
 
+i915-$(CONFIG_DEBUG_FS) += i915_debugfs.o
+
 obj-$(CONFIG_DRM_I915)  += i915.o
 
 CFLAGS_i915_trace_points.o := -I$(src)
drivers/gpu/drm/i915/i915_debugfs.c +0 -4
index 242189ee3607..6294ffdcc0ac 100644
@@ -40,8 +40,6 @@
 #include <drm/i915_drm.h>
 #include "i915_drv.h"
 
-#if defined(CONFIG_DEBUG_FS)
-
 enum {
 	ACTIVE_LIST,
 	INACTIVE_LIST,
@@ -3282,5 +3280,3 @@ void i915_debugfs_cleanup(struct drm_minor *minor)
 		drm_debugfs_remove_files(info_list, 1, minor);
 	}
 }
-
-#endif /* CONFIG_DEBUG_FS */
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 4 lines · Jani Nikula

The whole file is wrapped around in #if defined(CONFIG_DEBUG_FS) anyway, so skip the file at the build level already.

Queued for -next, thanks for the patch.
-Daniel

Quoted 52 lines
---
 drivers/gpu/drm/i915/Makefile       |    3 ++-
 drivers/gpu/drm/i915/i915_debugfs.c |    4 ----
 2 files changed, 2 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/Makefile +2 -1
index 41838eaa799c..da682cbcb806 100644
@@ -4,7 +4,6 @@
 
 ccflags-y := -Iinclude/drm
 i915-y := i915_drv.o i915_dma.o i915_irq.o \
-	  i915_debugfs.o \
 	  i915_gpu_error.o \
           i915_suspend.o \
 	  i915_gem.o \
@@ -55,6 +54,8 @@ i915-$(CONFIG_ACPI)	+= intel_acpi.o
 
 i915-$(CONFIG_DRM_I915_FBDEV) += intel_fbdev.o
 
+i915-$(CONFIG_DEBUG_FS) += i915_debugfs.o
+
 obj-$(CONFIG_DRM_I915)  += i915.o
 
 CFLAGS_i915_trace_points.o := -I$(src)
drivers/gpu/drm/i915/i915_debugfs.c +0 -4
index 242189ee3607..6294ffdcc0ac 100644
@@ -40,8 +40,6 @@
 #include <drm/i915_drm.h>
 #include "i915_drv.h"
 
-#if defined(CONFIG_DEBUG_FS)
-
 enum {
 	ACTIVE_LIST,
 	INACTIVE_LIST,
@@ -3282,5 +3280,3 @@ void i915_debugfs_cleanup(struct drm_minor *minor)
 		drm_debugfs_remove_files(info_list, 1, minor);
 	}
 }
-
-#endif /* CONFIG_DEBUG_FS */
Signature · 6 lines
1.7.9.5

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch