Loading Documentation/driver-model/devres.txt +1 −0 Original line number Original line Diff line number Diff line Loading @@ -240,6 +240,7 @@ CLOCK devm_of_clk_add_hw_provider() devm_of_clk_add_hw_provider() DMA DMA dmaenginem_async_device_register() dmam_alloc_coherent() dmam_alloc_coherent() dmam_alloc_attrs() dmam_alloc_attrs() dmam_declare_coherent_memory() dmam_declare_coherent_memory() Loading drivers/dma/dmaengine.c +35 −0 Original line number Original line Diff line number Diff line Loading @@ -1141,6 +1141,41 @@ void dma_async_device_unregister(struct dma_device *device) } } EXPORT_SYMBOL(dma_async_device_unregister); EXPORT_SYMBOL(dma_async_device_unregister); static void dmam_device_release(struct device *dev, void *res) { struct dma_device *device; device = *(struct dma_device **)res; dma_async_device_unregister(device); } /** * dmaenginem_async_device_register - registers DMA devices found * @device: &dma_device * * The operation is managed and will be undone on driver detach. */ int dmaenginem_async_device_register(struct dma_device *device) { void *p; int ret; p = devres_alloc(dmam_device_release, sizeof(void *), GFP_KERNEL); if (!p) return -ENOMEM; ret = dma_async_device_register(device); if (!ret) { *(struct dma_device **)p = device; devres_add(device->dev, p); } else { devres_free(p); } return ret; } EXPORT_SYMBOL(dmaenginem_async_device_register); struct dmaengine_unmap_pool { struct dmaengine_unmap_pool { struct kmem_cache *cache; struct kmem_cache *cache; const char *name; const char *name; Loading include/linux/dmaengine.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -1406,6 +1406,7 @@ static inline int dmaengine_desc_free(struct dma_async_tx_descriptor *desc) /* --- DMA device --- */ /* --- DMA device --- */ int dma_async_device_register(struct dma_device *device); int dma_async_device_register(struct dma_device *device); int dmaenginem_async_device_register(struct dma_device *device); void dma_async_device_unregister(struct dma_device *device); void dma_async_device_unregister(struct dma_device *device); void dma_run_dependencies(struct dma_async_tx_descriptor *tx); void dma_run_dependencies(struct dma_async_tx_descriptor *tx); struct dma_chan *dma_get_slave_channel(struct dma_chan *chan); struct dma_chan *dma_get_slave_channel(struct dma_chan *chan); Loading Loading
Documentation/driver-model/devres.txt +1 −0 Original line number Original line Diff line number Diff line Loading @@ -240,6 +240,7 @@ CLOCK devm_of_clk_add_hw_provider() devm_of_clk_add_hw_provider() DMA DMA dmaenginem_async_device_register() dmam_alloc_coherent() dmam_alloc_coherent() dmam_alloc_attrs() dmam_alloc_attrs() dmam_declare_coherent_memory() dmam_declare_coherent_memory() Loading
drivers/dma/dmaengine.c +35 −0 Original line number Original line Diff line number Diff line Loading @@ -1141,6 +1141,41 @@ void dma_async_device_unregister(struct dma_device *device) } } EXPORT_SYMBOL(dma_async_device_unregister); EXPORT_SYMBOL(dma_async_device_unregister); static void dmam_device_release(struct device *dev, void *res) { struct dma_device *device; device = *(struct dma_device **)res; dma_async_device_unregister(device); } /** * dmaenginem_async_device_register - registers DMA devices found * @device: &dma_device * * The operation is managed and will be undone on driver detach. */ int dmaenginem_async_device_register(struct dma_device *device) { void *p; int ret; p = devres_alloc(dmam_device_release, sizeof(void *), GFP_KERNEL); if (!p) return -ENOMEM; ret = dma_async_device_register(device); if (!ret) { *(struct dma_device **)p = device; devres_add(device->dev, p); } else { devres_free(p); } return ret; } EXPORT_SYMBOL(dmaenginem_async_device_register); struct dmaengine_unmap_pool { struct dmaengine_unmap_pool { struct kmem_cache *cache; struct kmem_cache *cache; const char *name; const char *name; Loading
include/linux/dmaengine.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -1406,6 +1406,7 @@ static inline int dmaengine_desc_free(struct dma_async_tx_descriptor *desc) /* --- DMA device --- */ /* --- DMA device --- */ int dma_async_device_register(struct dma_device *device); int dma_async_device_register(struct dma_device *device); int dmaenginem_async_device_register(struct dma_device *device); void dma_async_device_unregister(struct dma_device *device); void dma_async_device_unregister(struct dma_device *device); void dma_run_dependencies(struct dma_async_tx_descriptor *tx); void dma_run_dependencies(struct dma_async_tx_descriptor *tx); struct dma_chan *dma_get_slave_channel(struct dma_chan *chan); struct dma_chan *dma_get_slave_channel(struct dma_chan *chan); Loading