Skip to content

Commit

Permalink
drm: Replace kernel.h with the necessary inclusions
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20211110102423.54282-1-andriy.shevchenko@linux.intel.com
  • Loading branch information
Andy Shevchenko authored and Thomas Zimmermann committed Dec 9, 2021
1 parent 0384833 commit ae710a4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/drm/drm_gem_ttm_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#ifndef DRM_GEM_TTM_HELPER_H
#define DRM_GEM_TTM_HELPER_H

#include <linux/kernel.h>
#include <linux/container_of.h>

#include <drm/drm_device.h>
#include <drm/drm_gem.h>
Expand Down
2 changes: 1 addition & 1 deletion include/drm/drm_gem_vram_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#include <drm/ttm/ttm_bo_api.h>
#include <drm/ttm/ttm_bo_driver.h>

#include <linux/container_of.h>
#include <linux/dma-buf-map.h>
#include <linux/kernel.h> /* for container_of() */

struct drm_mode_create_dumb;
struct drm_plane;
Expand Down
4 changes: 3 additions & 1 deletion include/drm/drm_mm.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,15 @@
*/
#include <linux/bug.h>
#include <linux/rbtree.h>
#include <linux/kernel.h>
#include <linux/limits.h>
#include <linux/mm_types.h>
#include <linux/list.h>
#include <linux/spinlock.h>
#ifdef CONFIG_DRM_DEBUG_MM
#include <linux/stackdepot.h>
#endif
#include <linux/types.h>

#include <drm/drm_print.h>

#ifdef CONFIG_DRM_DEBUG_MM
Expand Down

0 comments on commit ae710a4

Please sign in to comment.