Skip to content

Commit

Permalink
media: staging: rkisp1: stats: replace spin_lock_irqsave with spin_lo…
Browse files Browse the repository at this point in the history
…ck_irq

The function 'rkisp1_stats_vb2_stop_streaming' runs in user context
therefore it is enough to use spin_lock_irq

Signed-off-by: Dafna Hirschfeld <[email protected]>
Acked-by: Helen Koike <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
Dafna Hirschfeld authored and sigmaris committed Aug 8, 2020
1 parent a3fb527 commit a4854a6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/staging/media/rkisp1/rkisp1-stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,12 @@ static void rkisp1_stats_vb2_stop_streaming(struct vb2_queue *vq)
{
struct rkisp1_stats *stats = vq->drv_priv;
struct rkisp1_buffer *buf;
unsigned long flags;
unsigned int i;

/* Make sure no new work queued in isr before draining wq */
spin_lock_irqsave(&stats->irq_lock, flags);
spin_lock_irq(&stats->irq_lock);
stats->is_streaming = false;
spin_unlock_irqrestore(&stats->irq_lock, flags);
spin_unlock_irq(&stats->irq_lock);

drain_workqueue(stats->readout_wq);

Expand Down

0 comments on commit a4854a6

Please sign in to comment.