aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/drm_memory.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/drm/drm_memory.c')
-rw-r--r--drivers/char/drm/drm_memory.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/char/drm/drm_memory.c b/drivers/char/drm/drm_memory.c
index 92a867082376..93019901bd30 100644
--- a/drivers/char/drm/drm_memory.c
+++ b/drivers/char/drm/drm_memory.c
@@ -80,7 +80,7 @@ void *drm_realloc(void *oldpt, size_t oldsize, size_t size, int area)
80 80
81#if __OS_HAS_AGP 81#if __OS_HAS_AGP
82static void *agp_remap(unsigned long offset, unsigned long size, 82static void *agp_remap(unsigned long offset, unsigned long size,
83 drm_device_t * dev) 83 struct drm_device * dev)
84{ 84{
85 unsigned long *phys_addr_map, i, num_pages = 85 unsigned long *phys_addr_map, i, num_pages =
86 PAGE_ALIGN(size) / PAGE_SIZE; 86 PAGE_ALIGN(size) / PAGE_SIZE;
@@ -94,7 +94,7 @@ static void *agp_remap(unsigned long offset, unsigned long size,
94 offset -= dev->hose->mem_space->start; 94 offset -= dev->hose->mem_space->start;
95#endif 95#endif
96 96
97 for (agpmem = dev->agp->memory; agpmem; agpmem = agpmem->next) 97 list_for_each_entry(agpmem, &dev->agp->memory, head)
98 if (agpmem->bound <= offset 98 if (agpmem->bound <= offset
99 && (agpmem->bound + (agpmem->pages << PAGE_SHIFT)) >= 99 && (agpmem->bound + (agpmem->pages << PAGE_SHIFT)) >=
100 (offset + size)) 100 (offset + size))
@@ -123,7 +123,7 @@ static void *agp_remap(unsigned long offset, unsigned long size,
123} 123}
124 124
125/** Wrapper around agp_allocate_memory() */ 125/** Wrapper around agp_allocate_memory() */
126DRM_AGP_MEM *drm_alloc_agp(drm_device_t * dev, int pages, u32 type) 126DRM_AGP_MEM *drm_alloc_agp(struct drm_device * dev, int pages, u32 type)
127{ 127{
128 return drm_agp_allocate_memory(dev->agp->bridge, pages, type); 128 return drm_agp_allocate_memory(dev->agp->bridge, pages, type);
129} 129}
@@ -148,7 +148,7 @@ int drm_unbind_agp(DRM_AGP_MEM * handle)
148 148
149#else /* __OS_HAS_AGP */ 149#else /* __OS_HAS_AGP */
150static inline void *agp_remap(unsigned long offset, unsigned long size, 150static inline void *agp_remap(unsigned long offset, unsigned long size,
151 drm_device_t * dev) 151 struct drm_device * dev)
152{ 152{
153 return NULL; 153 return NULL;
154} 154}