#define POOL_TIMEOUT_JIFFIES ((100 /* msec */ * HZ) / 1000)
-static DECLARE_MUTEX (pools_lock);
+static DEFINE_MUTEX (pools_lock);
static ssize_t
show_pools (struct device *dev, struct device_attribute *attr, char *buf)
size -= temp;
next += temp;
- down (&pools_lock);
+ mutex_lock(&pools_lock);
list_for_each_entry(pool, &dev->dma_pools, pools) {
unsigned pages = 0;
unsigned blocks = 0;
size -= temp;
next += temp;
}
- up (&pools_lock);
+ mutex_unlock(&pools_lock);
return PAGE_SIZE - size;
}
if (dev) {
int ret;
- down (&pools_lock);
+ mutex_lock(&pools_lock);
if (list_empty (&dev->dma_pools))
ret = device_create_file (dev, &dev_attr_pools);
else
kfree(retval);
retval = NULL;
}
- up (&pools_lock);
+ mutex_unlock(&pools_lock);
} else
INIT_LIST_HEAD (&retval->pools);
void
dma_pool_destroy (struct dma_pool *pool)
{
- down (&pools_lock);
+ mutex_lock(&pools_lock);
list_del (&pool->pools);
if (pool->dev && list_empty (&pool->dev->dma_pools))
device_remove_file (pool->dev, &dev_attr_pools);
- up (&pools_lock);
+ mutex_unlock(&pools_lock);
while (!list_empty (&pool->page_list)) {
struct dma_page *page;