summaryrefslogtreecommitdiff
path: root/linux/mga_dma.c
diff options
context:
space:
mode:
authorRik Faith <faith@alephnull.com>2000-08-08 16:04:21 +0000
committerRik Faith <faith@alephnull.com>2000-08-08 16:04:21 +0000
commit8b9363d1b1f7bc40fb68261f7659dea5124f2821 (patch)
tree5292870b287ab2ad5ca0ea71487115b158c6d507 /linux/mga_dma.c
parent9199075a6a975ebcc44aff53fe0f77080c01a30b (diff)
Sync with Linux 2.4.0-test6-pre8ati-4-0-2-branch
Diffstat (limited to 'linux/mga_dma.c')
-rw-r--r--linux/mga_dma.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/linux/mga_dma.c b/linux/mga_dma.c
index 28e8811c..d02c3b58 100644
--- a/linux/mga_dma.c
+++ b/linux/mga_dma.c
@@ -57,8 +57,8 @@ static unsigned long mga_alloc_page(drm_device_t *dev)
if(address == 0UL) {
return 0;
}
- atomic_inc(&mem_map[MAP_NR((void *) address)].count);
- set_bit(PG_locked, &mem_map[MAP_NR((void *) address)].flags);
+ atomic_inc(&virt_to_page(address)->count);
+ set_bit(PG_locked, &virt_to_page(address)->flags);
return address;
}
@@ -70,9 +70,9 @@ static void mga_free_page(drm_device_t *dev, unsigned long page)
if(page == 0UL) {
return;
}
- atomic_dec(&mem_map[MAP_NR((void *) page)].count);
- clear_bit(PG_locked, &mem_map[MAP_NR((void *) page)].flags);
- wake_up(&mem_map[MAP_NR((void *) page)].wait);
+ atomic_dec(&virt_to_page(page)->count);
+ clear_bit(PG_locked, &virt_to_page(page)->flags);
+ wake_up(&virt_to_page(page)->wait);
free_page(page);
return;
}