diff mbox series

[5/5] drm: Include <linux/of.h> in drm_modes.c

Message ID 20230109101243.26995-6-tzimmermann@suse.de (mailing list archive)
State New, archived
Headers show
Series drm: Do not include <linux/fb.h> unnecessarily | expand

Commit Message

Thomas Zimmermann Jan. 9, 2023, 10:12 a.m. UTC
Include <linux/of.h> in drm_modes.c for of_property_read_u32(). Until
now, the OF header got included via <linux/fb.h>.

Also comment on the reason for still including <linux/fb.h>. The header
file is still required to get KHZ2PICOS(). The macro is part of the UAPI
headers, so it cannot be moved to a less prominent location.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/drm_modes.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox series

Patch

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>