dmapool.c (44cc6c08da0b6c8321c6740bbb6a0c6feb45b2c2) dmapool.c (676bd99178cd962ed24ffdad222b7069d330a969)
1/*
2 * DMA Pool allocator
3 *
4 * Copyright 2001 David Brownell
5 * Copyright 2007 Intel Corporation
6 * Author: Matthew Wilcox <willy@linux.intel.com>
7 *
8 * This software may be redistributed and/or modified under the terms of

--- 380 unchanged lines hidden (view full) ---

389
390static struct dma_page *pool_find_page(struct dma_pool *pool, dma_addr_t dma)
391{
392 struct dma_page *page;
393
394 list_for_each_entry(page, &pool->page_list, page_list) {
395 if (dma < page->dma)
396 continue;
1/*
2 * DMA Pool allocator
3 *
4 * Copyright 2001 David Brownell
5 * Copyright 2007 Intel Corporation
6 * Author: Matthew Wilcox <willy@linux.intel.com>
7 *
8 * This software may be redistributed and/or modified under the terms of

--- 380 unchanged lines hidden (view full) ---

389
390static struct dma_page *pool_find_page(struct dma_pool *pool, dma_addr_t dma)
391{
392 struct dma_page *page;
393
394 list_for_each_entry(page, &pool->page_list, page_list) {
395 if (dma < page->dma)
396 continue;
397 if (dma < (page->dma + pool->allocation))
397 if ((dma - page->dma) < pool->allocation)
398 return page;
399 }
400 return NULL;
401}
402
403/**
404 * dma_pool_free - put block back into dma pool
405 * @pool: the dma pool holding the block

--- 132 unchanged lines hidden ---
398 return page;
399 }
400 return NULL;
401}
402
403/**
404 * dma_pool_free - put block back into dma pool
405 * @pool: the dma pool holding the block

--- 132 unchanged lines hidden ---