Skip to content

Commit

Permalink
Staging: ipack/devices/ipoctal: remove unneeded lock in IRQ handler
Browse files Browse the repository at this point in the history
In the rest of the code, the data is protected with spin_lock_irqsave().

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Samuel Iglesias Gonsalvez authored and Greg Kroah-Hartman committed Jun 25, 2012
1 parent bae8bd1 commit 59d6a29
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/staging/ipack/devices/ipoctal.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ static int ipoctal_irq_handler(void *arg)
ipoctal->nb_bytes[channel] = 0;
continue;
}
spin_lock(&ipoctal->lock[channel]);

value = ipoctal->tty_port[channel].xmit_buf[*pointer_write];
ipoctal_write_io_reg(ipoctal,
&ipoctal->chan_regs[channel].u.w.thr,
Expand All @@ -309,7 +309,6 @@ static int ipoctal_irq_handler(void *arg)
(*pointer_write)++;
*pointer_write = *pointer_write % PAGE_SIZE;
ipoctal->nb_bytes[channel]--;
spin_unlock(&ipoctal->lock[channel]);

if ((ipoctal->nb_bytes[channel] == 0) &&
(waitqueue_active(&ipoctal->queue[channel]))) {
Expand Down

0 comments on commit 59d6a29

Please sign in to comment.