patch-2.3.46 linux/drivers/char/zr36120_mem.c

Next file: linux/drivers/i2o/i2o_block.c
Previous file: linux/drivers/char/vt.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.45/linux/drivers/char/zr36120_mem.c linux/drivers/char/zr36120_mem.c
@@ -35,17 +35,6 @@
 /* Memory management functions */
 /*******************************/
 
-inline int __get_order(unsigned long size)
-{
-        int order = 0;
-	size = (size+PAGE_SIZE-1)/PAGE_SIZE;
-	while (size) {
-		size /= 2;
-		order++;
-	}
-	return order;
-}
-			
 void* bmalloc(unsigned long size)
 {
 	void* mem;
@@ -56,7 +45,7 @@
 	 * The following function got a lot of memory at boottime,
 	 * so we know its always there...
 	 */
-	mem = (void*)__get_free_pages(GFP_USER|GFP_DMA,__get_order(size));
+	mem = (void*)__get_free_pages(GFP_USER|GFP_DMA,get_order(size));
 #endif
 	if (mem) {
 		unsigned long adr = (unsigned long)mem;
@@ -82,7 +71,7 @@
 #ifdef CONFIG_BIGPHYS_AREA
 		bigphysarea_free_pages(mem);
 #else
-		free_pages((unsigned long)mem,__get_order(size));
+		free_pages((unsigned long)mem,get_order(size));
 #endif
 	}
 }

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