[PATCH] drm/ttm: Fix build on architectures without AGP

Ben Hutchings ben at decadent.org.uk
Sun Jul 18 13:51:42 PDT 2010


Make inclusion of <asm/agp.h> conditional on TTM_HAS_AGP.  The use
of the functions declared in it is already conditional.

Reported-by: Geert Stappers <stappers at stappers.nl>
Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
Tested-by: Geert Stappers <stappers at stappers.nl>
---
 drivers/gpu/drm/ttm/ttm_page_alloc.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c
index b1d67dc..1f32b46 100644
--- a/drivers/gpu/drm/ttm/ttm_page_alloc.c
+++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c
@@ -40,7 +40,9 @@
 #include <linux/slab.h>
 
 #include <asm/atomic.h>
+#ifdef TTM_HAS_AGP
 #include <asm/agp.h>
+#endif
 
 #include "ttm/ttm_bo_driver.h"
 #include "ttm/ttm_page_alloc.h"
-- 
1.7.1




More information about the dri-devel mailing list