summaryrefslogtreecommitdiffstats
path: root/patches/misc/drm-mm-include-required-headers-in-drm_mm.h.patch
blob: 70d73f4002b6cbeba8d29601f2b48e2099d650ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
From c7739be126930006e3bfbdb2fb070a967abc5e09 Mon Sep 17 00:00:00 2001
From: David Herrmann <dh.herrmann@gmail.com>
Date: Thu, 25 Jul 2013 18:02:31 +0200
Subject: [PATCH] drm/mm: include required headers in drm_mm.h

We need BUG_ON(), spinlock_t and standard kernel data-types so include the
right headers.

Subject: [drm-intel:drm-intel-nightly 154/166] include/drm/drm_mm.h:67:2:
 error: unknown type name 'spinlock_t'
Message-ID: <51f14693.g5HGdcuw2v3m8FOd%fengguang.wu@intel.com>

In case it didn't link to it correctly. Somehow this bug doesn't occur
here on my machine, hmm. But I think fixing drm_mm.h is better than
changing the include-order in drm_vma_manager.h, so this is what I
did.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 86e81f0e624b55fa9f1560c3b64bc80e458c5168)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
 include/drm/drm_mm.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/drm/drm_mm.h b/include/drm/drm_mm.h
index aebbe3d5b280..5ce6ffee0b85 100644
--- a/include/drm/drm_mm.h
+++ b/include/drm/drm_mm.h
@@ -36,7 +36,10 @@
 /*
  * Generic range manager structs
  */
+#include <linux/bug.h>
+#include <linux/kernel.h>
 #include <linux/list.h>
+#include <linux/spinlock.h>
 #ifdef CONFIG_DEBUG_FS
 #include <linux/seq_file.h>
 #endif
-- 
1.8.1.2