patch-2.4.0-test6 linux/drivers/sound/emu10k1/audio.c

Next file: linux/drivers/sound/es1370.c
Previous file: linux/drivers/sound/dmabuf.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test5/linux/drivers/sound/emu10k1/audio.c linux/drivers/sound/emu10k1/audio.c
@@ -38,6 +38,7 @@
 #include "audio.h"
 #include <linux/sched.h>
 #include <linux/smp_lock.h>
+#include <linux/wrapper.h>
 
 static void calculate_ofrag(struct woinst *);
 static void calculate_ifrag(struct wiinst *);
@@ -918,7 +919,7 @@
 
 			/* Now mark the pages as reserved, otherwise remap_page_range doesn't do what we want */
 			for (i = 0; i < wave_out->wavexferbuf->numpages; i++)
-				set_bit(PG_reserved, &mem_map[MAP_NR(wave_out->pagetable[i])].flags);
+				mem_map_reserve(virt_to_page(wave_out->pagetable[i]));
 		}
 
 		size = vma->vm_end - vma->vm_start;
@@ -1137,7 +1138,7 @@
 
 				/* Undo marking the pages as reserved */
 				for (i = 0; i < woinst->wave_out->wavexferbuf->numpages; i++)
-					set_bit(PG_reserved, &mem_map[MAP_NR(woinst->wave_out->pagetable[i])].flags);
+					mem_map_reserve(virt_to_page(woinst->wave_out->pagetable[i]));
 			}
 
 			woinst->mapped = 0;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)