Skip to contentSkip to conversation

Fix ttm_page_alloc.c build breakage

PATCH In review Luck, Tony 2 participants 2 messages Jul 21, 2010 – Jul 22, 2010

Subsystems (3)
lore
Share & tools
lore

Luck, Tony

author
#0 lore raw

PATCH 1/1 Fix ttm_page_alloc.c build breakage

The commit 1e8655f87333def92bb8215b423adc65403b08a5
drm/ttm: Fix build on architectures without AGP

looks at TTM_HAS_AGP before it has been set in ttm_bo_driver.h

Move the conditional inclusion of <asm/agp.h> *after* we have included ttm_bo_driver.h

---

drivers/gpu/drm/ttm/ttm_page_alloc.c +3 -3
index 1f32b46..f394b3b 100644
@@ -40,13 +40,13 @@
 #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"
 
+#ifdef TTM_HAS_AGP
+#include <asm/agp.h>
+#endif
 
 #define NUM_PAGES_TO_ALLOC		(PAGE_SIZE/sizeof(struct page *))
 #define SMALL_ALLOCATION		16
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Tony

The commit 1e8655f87333def92bb8215b423adc65403b08a5
drm/ttm: Fix build on architectures without AGP

looks at TTM_HAS_AGP before it has been set in ttm_bo_driver.h

Move the conditional inclusion of <asm/agp.h> *after* we have included ttm_bo_driver.h

D'oh, yes.

Quoted 1 line

Ben.

Signature · 2 lines
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.