diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2023-01-11 14:01:58 +0100 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2023-01-13 13:18:35 +0100 |
commit | fb28b3f0ecb2393307e5618adb331be5e0f44006 (patch) | |
tree | 06016ad6c48072556aa1ed965c1198bb8b37d3f4 /drivers/gpu/drm/drm_modes.c | |
parent | a6276e92a037fc2dc888189a97e2b47887160016 (diff) | |
download | lwn-fb28b3f0ecb2393307e5618adb331be5e0f44006.tar.gz lwn-fb28b3f0ecb2393307e5618adb331be5e0f44006.zip |
drm: Include <linux/of.h> where needed
Include <linux/of.h> in source files that need it. Some of DRM's
source code gets OF header via drm_crtc_helper.h and <linux/fb.h>,
which can leed to unnecessary recompilation.
In drm_modes.c, add a comment on the reason for still including
<linux/fb.h>. The header file is required to get KHZ2PICOS(). The
macro is part of the UAPI headers, so it cannot be moved to a less
prominent location.
v2:
* include <linux/of.h> in komeda_drv.c (kernel test robot)
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Liviu Dudau <liviu.dudau@arm.com> # komeda
Acked-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20230111130206.29974-3-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/drm_modes.c')
-rw-r--r-- | drivers/gpu/drm/drm_modes.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c index be030f4a5311..40d482a01178 100644 --- a/drivers/gpu/drm/drm_modes.c +++ b/drivers/gpu/drm/drm_modes.c @@ -31,10 +31,11 @@ */ #include <linux/ctype.h> +#include <linux/export.h> +#include <linux/fb.h> /* for KHZ2PICOS() */ #include <linux/list.h> #include <linux/list_sort.h> -#include <linux/export.h> -#include <linux/fb.h> +#include <linux/of.h> #include <video/of_display_timing.h> #include <video/of_videomode.h> |