Skip to content

Commit f8f530b

Browse files
Dan Carpentervinodkoul
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 8ddad55 commit f8f530b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/dma/qcom/gpi.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,7 +1191,6 @@ static int gpi_reset_chan(struct gchan *gchan, enum gpi_cmd gpi_cmd)
11911191
{
11921192
struct gpii *gpii = gchan->gpii;
11931193
struct gpi_ring *ch_ring = &gchan->ch_ring;
1194-
unsigned long flags;
11951194
LIST_HEAD(list);
11961195
int ret;
11971196

@@ -1214,9 +1213,9 @@ static int gpi_reset_chan(struct gchan *gchan, enum gpi_cmd gpi_cmd)
12141213
gpi_mark_stale_events(gchan);
12151214

12161215
/* remove all async descriptors */
1217-
spin_lock_irqsave(&gchan->vc.lock, flags);
1216+
spin_lock(&gchan->vc.lock);
12181217
vchan_get_all_descriptors(&gchan->vc, &list);
1219-
spin_unlock_irqrestore(&gchan->vc.lock, flags);
1218+
spin_unlock(&gchan->vc.lock);
12201219
write_unlock_irq(&gpii->pm_lock);
12211220
vchan_dma_desc_free_list(&gchan->vc, &list);
12221221

0 commit comments

Comments
 (0)