Lines Matching refs:dev
49 struct device *dev; member
68 show_pools(struct device *dev, struct device_attribute *attr, char *buf) in show_pools() argument
84 list_for_each_entry(pool, &dev->dma_pools, pools) { in show_pools()
131 struct dma_pool *dma_pool_create(const char *name, struct device *dev, in dma_pool_create() argument
158 retval = kmalloc_node(sizeof(*retval), GFP_KERNEL, dev_to_node(dev)); in dma_pool_create()
164 retval->dev = dev; in dma_pool_create()
184 if (list_empty(&dev->dma_pools)) in dma_pool_create()
186 list_add(&retval->pools, &dev->dma_pools); in dma_pool_create()
191 err = device_create_file(dev, &dev_attr_pools); in dma_pool_create()
229 page->vaddr = dma_alloc_coherent(pool->dev, pool->allocation, in pool_alloc_page()
257 dma_free_coherent(pool->dev, pool->allocation, page->vaddr, dma); in pool_free_page()
277 if (pool->dev && list_empty(&pool->dev->dma_pools)) in dma_pool_destroy()
281 device_remove_file(pool->dev, &dev_attr_pools); in dma_pool_destroy()
289 if (pool->dev) in dma_pool_destroy()
290 dev_err(pool->dev, in dma_pool_destroy()
358 if (pool->dev) in dma_pool_alloc()
359 dev_err(pool->dev, in dma_pool_alloc()
414 if (pool->dev) in dma_pool_free()
415 dev_err(pool->dev, in dma_pool_free()
428 if (pool->dev) in dma_pool_free()
429 dev_err(pool->dev, in dma_pool_free()
446 if (pool->dev) in dma_pool_free()
447 dev_err(pool->dev, "dma_pool_free %s, dma %Lx " in dma_pool_free()
475 static void dmam_pool_release(struct device *dev, void *res) in dmam_pool_release() argument
482 static int dmam_pool_match(struct device *dev, void *res, void *match_data) in dmam_pool_match() argument
498 struct dma_pool *dmam_pool_create(const char *name, struct device *dev, in dmam_pool_create() argument
507 pool = *ptr = dma_pool_create(name, dev, size, align, allocation); in dmam_pool_create()
509 devres_add(dev, ptr); in dmam_pool_create()
525 struct device *dev = pool->dev; in dmam_pool_destroy() local
527 WARN_ON(devres_release(dev, dmam_pool_release, dmam_pool_match, pool)); in dmam_pool_destroy()