diff options
author | Dan Carpenter <dan.carpenter@linaro.org> | 2024-05-09 14:02:11 +0300 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2024-06-11 21:25:34 +0300 |
commit | f8f530ba429a334fe1a28714787f8a98e90777ec (patch) | |
tree | 9ded3f90d9c475f31455dca6f00db079d108ba6f /drivers/dma/qcom | |
parent | 8ddad558997002ce67980e30c9e8dfaa696e163b (diff) | |
download | linux-f8f530ba429a334fe1a28714787f8a98e90777ec.tar.xz |
dmaengine: qcom: gpi: clean up the IRQ disable/enable in gpi_reset_chan()
The calls write_lock/unlock_irq() disables and re-enables the IRQs.
Calling spin_lock_irqsave() and spin_lock_restore() when the IRQs are
already disabled doesn't do anything and just makes the code confusing.
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/8be473eb-65e0-42b4-b574-e61c3a7f62d8@moroto.mountain
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/qcom')
-rw-r--r-- | drivers/dma/qcom/gpi.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/dma/qcom/gpi.c b/drivers/dma/qcom/gpi.c index 639ab304db9b..e6ebd688d746 100644 --- a/drivers/dma/qcom/gpi.c +++ b/drivers/dma/qcom/gpi.c @@ -1191,7 +1191,6 @@ static int gpi_reset_chan(struct gchan *gchan, enum gpi_cmd gpi_cmd) { struct gpii *gpii = gchan->gpii; struct gpi_ring *ch_ring = &gchan->ch_ring; - unsigned long flags; LIST_HEAD(list); int ret; @@ -1214,9 +1213,9 @@ static int gpi_reset_chan(struct gchan *gchan, enum gpi_cmd gpi_cmd) gpi_mark_stale_events(gchan); /* remove all async descriptors */ - spin_lock_irqsave(&gchan->vc.lock, flags); + spin_lock(&gchan->vc.lock); vchan_get_all_descriptors(&gchan->vc, &list); - spin_unlock_irqrestore(&gchan->vc.lock, flags); + spin_unlock(&gchan->vc.lock); write_unlock_irq(&gpii->pm_lock); vchan_dma_desc_free_list(&gchan->vc, &list); |