Skip to content

Commit

Permalink
dmaengine: Add a warning for drivers not using the generic slave caps…
Browse files Browse the repository at this point in the history
… retrieval

For the slave caps retrieval to be really useful, most drivers need to
implement it.

Hence, we need to be slightly more aggressive, and trigger a warning at
registration time for drivers that don't fill their caps infos in order to
encourage them to implement it.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
  • Loading branch information
mripard authored and Vinod Koul committed Dec 22, 2014
1 parent 1cac81b commit ecc19d1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/dma/dmaengine.c
Original file line number Diff line number Diff line change
Expand Up @@ -826,6 +826,9 @@ int dma_async_device_register(struct dma_device *device)
BUG_ON(!device->device_issue_pending);
BUG_ON(!device->dev);

WARN(dma_has_cap(DMA_SLAVE, device->cap_mask) && !device->directions,
"this driver doesn't support generic slave capabilities reporting\n");

/* note: this only matters in the
* CONFIG_ASYNC_TX_ENABLE_CHANNEL_SWITCH=n case
*/
Expand Down

0 comments on commit ecc19d1

Please sign in to comment.