patch-2.3.46 linux/drivers/net/ltpc.c
Next file: linux/drivers/net/pcmcia/3c574_cs.c
Previous file: linux/drivers/net/hamradio/scc.c
Back to the patch index
Back to the overall index
- Lines: 34
- Date:
Mon Feb 14 15:34:21 2000
- Orig file:
v2.3.45/linux/drivers/net/ltpc.c
- Orig date:
Thu Feb 10 17:11:10 2000
diff -u --recursive --new-file v2.3.45/linux/drivers/net/ltpc.c linux/drivers/net/ltpc.c
@@ -246,23 +246,9 @@
/* Dma Memory related stuff, cribbed directly from 3c505.c */
-/* Pure 2^n version of get_order */
-static 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 dma_mem_alloc(int size)
{
- int order = __get_order(size);
+ int order = get_order(size);
return __get_dma_pages(GFP_KERNEL, order);
}
@@ -1364,7 +1350,7 @@
if(debug&DEBUG_VERBOSE) printk("free_pages\n");
- free_pages( (unsigned long) ltdmabuf, __get_order(1000));
+ free_pages( (unsigned long) ltdmabuf, get_order(1000));
ltdmabuf=NULL;
ltdmacbuf=NULL;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)