diff options
author | Gilad Ben-Yossef <gilad@benyossef.com> | 2017-11-13 17:45:50 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-11-27 11:20:40 +0300 |
commit | d59c6d9cee8c8c66a0fe67e025a32266cc963e16 (patch) | |
tree | 720d87d7e64e8ad39366ec134ef7e581187ecba3 /drivers/staging/ccree/ssi_driver.c | |
parent | 5a83a3937bb06c46a67a05dbc4ddbd433ed11a7c (diff) | |
download | linux-d59c6d9cee8c8c66a0fe67e025a32266cc963e16.tar.xz |
staging: ccree: replace msleep with a completion
When the driver would try to queue commands to the HW FIFO but ran out of
slots it would use msleep as a delay until the FIFO would clear. This is
messy and not accurate.
Replace the msleep with a proper completion on the event of command
completion which should indicate at least one slot is free.
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/ccree/ssi_driver.c')
-rw-r--r-- | drivers/staging/ccree/ssi_driver.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/ccree/ssi_driver.c b/drivers/staging/ccree/ssi_driver.c index b17b81137db0..3cb22967afb7 100644 --- a/drivers/staging/ccree/ssi_driver.c +++ b/drivers/staging/ccree/ssi_driver.c @@ -251,6 +251,8 @@ static int init_cc_resources(struct platform_device *plat_dev) } dev_dbg(dev, "Registered to IRQ: %d\n", new_drvdata->irq); + init_completion(&new_drvdata->hw_queue_avail); + if (!plat_dev->dev.dma_mask) plat_dev->dev.dma_mask = &plat_dev->dev.coherent_dma_mask; |