patch-2.3.46 linux/arch/mips/jazz/floppy-jazz.c

Next file: linux/arch/mips/lib/floppy-std.c
Previous file: linux/arch/m68k/mac/misc.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.45/linux/arch/mips/jazz/floppy-jazz.c linux/arch/mips/jazz/floppy-jazz.c
@@ -94,26 +94,11 @@
 	return JAZZ_FDC_BASE;
 }
 
-/* Pure 2^n version of get_order */
-extern inline int __get_order(unsigned long size)
-{
-	int order;
-
-	size = (size-1) >> (PAGE_SHIFT-1);
-	order = -1;
-	do {
-		size >>= 1;
-		order++;
-	} while (size);
-	return order;
-}
-
 static unsigned long jazz_fd_dma_mem_alloc(unsigned long size)
 {
-	int order = __get_order(size);
 	unsigned long mem;
 
-	mem = __get_dma_pages(GFP_KERNEL, order);
+	mem = __get_dma_pages(GFP_KERNEL, get_order(size));
 	if(!mem)
 		return 0;
 	vdma_alloc(PHYSADDR(mem), size);	/* XXX error checking */
@@ -125,7 +110,7 @@
                                         unsigned long size)
 {       
 	vdma_free(vdma_phys2log(PHYSADDR(addr)));
-	free_pages(addr, __get_order(size));	
+	free_pages(addr, get_order(size));	
 }
 
 static unsigned long jazz_fd_drive_type(unsigned long n)

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