History

drm: 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.

Andy Shevchenko committed 5 years ago

Commit ae710a41 parent 03848333 files · +5 −3Browse files

Showing the changes to include (3 of 3 files). Show all

Unified · Split

3 files
  1. include/drm/drm_gem_ttm_helper.h +1 −1
  2. include/drm/drm_gem_vram_helper.h +1 −1
  3. include/drm/drm_mm.h +3 −1
include/drm/drm_gem_ttm_helper.h+1−1
@@ -3,7 +3,7 @@ · 2 unmodified lines
33 #ifndef DRM_GEM_TTM_HELPER_H
44 #define DRM_GEM_TTM_HELPER_H
55
6−#include <linux/kernel.h>
6+#include <linux/container_of.h>
77
88 #include <drm/drm_device.h>
99 #include <drm/drm_gem.h>
include/drm/drm_gem_vram_helper.h+1−1
@@ -11,8 +11,8 @@ · 10 unmodified lines
1111 #include <drm/ttm/ttm_bo_api.h>
1212 #include <drm/ttm/ttm_bo_driver.h>
1313
14+#include <linux/container_of.h>
1415 #include <linux/dma-buf-map.h>
15−#include <linux/kernel.h> /* for container_of() */
1616
1717 struct drm_mode_create_dumb;
1818 struct drm_plane;
include/drm/drm_mm.h+3−1
@@ -39,13 +39,15 @@ · 38 unmodified lines
3939 */
4040 #include <linux/bug.h>
4141 #include <linux/rbtree.h>
42−#include <linux/kernel.h>
42+#include <linux/limits.h>
4343 #include <linux/mm_types.h>
4444 #include <linux/list.h>
4545 #include <linux/spinlock.h>
4646 #ifdef CONFIG_DRM_DEBUG_MM
4747 #include <linux/stackdepot.h>
4848 #endif
49+#include <linux/types.h>
50+
4951 #include <drm/drm_print.h>
5052
5153 #ifdef CONFIG_DRM_DEBUG_MM

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t