patch-2.3.46 linux/drivers/net/3c505.c
Next file: linux/drivers/net/8139too.c
Previous file: linux/drivers/macintosh/via-pmu68k.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/3c505.c
- Orig date:
Sun Feb 13 19:29:04 2000
diff -u --recursive --new-file v2.3.45/linux/drivers/net/3c505.c linux/drivers/net/3c505.c
@@ -184,23 +184,9 @@
/* Dma Memory related stuff */
-/* 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);
}
@@ -1191,7 +1177,7 @@
free_irq(dev->irq, dev);
free_dma(dev->dma);
- free_pages((unsigned long) adapter->dma_buffer, __get_order(DMA_BUFFER_SIZE));
+ free_pages((unsigned long) adapter->dma_buffer, get_order(DMA_BUFFER_SIZE));
MOD_DEC_USE_COUNT;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)