Skip to contentSkip to conversation

drm/i915: Replace kernel.h with the necessary inclusions

PATCH New Andy Shevchenko 1 participant 1 message Nov 10, 2021 DRM drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: Replace kernel.h with the necessary inclusions

When kernel.h is used in the headers it adds a lot into dependency hell, especially when there are circular dependencies are involved.

Replace kernel.h inclusion with the list of what is really being used.

---
 include/drm/intel-gtt.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
include/drm/intel-gtt.h +4 -1
index abfefaaf897a..4e5f8e7e25d0 100644
@@ -6,7 +6,10 @@
 
 #include <linux/agp_backend.h>
 #include <linux/intel-iommu.h>
-#include <linux/kernel.h>
+#include <linux/types.h>
+
+struct pci_dev;
+struct sg_table;
 
 void intel_gtt_get(u64 *gtt_total,
 		   phys_addr_t *mappable_base,
Signature · 1 line
2.33.0