mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
bitkeeper revision 1.1713.1.12 (42b0da31QIvTtfE2iHo4yER4A1GFIw)
serial.c: Fix serial_getc locking.
This commit is contained in:
1 parent
c39f4a5931
commit
7752c1a036
1 file changed
+4
@@ -176,11 +176,15 @@ char serial_getc(int handle)
|
||||
if ( port->rxbufp != port->rxbufc )
|
||||
{
|
||||
c = port->rxbuf[MASK_SERIAL_RXBUF_IDX(port->rxbufc++)];
|
||||
spin_unlock_irqrestore(&port->lock, flags);
|
||||
break;
|
||||
}
|
||||
|
||||
if ( port->driver->getc(port, &c) )
|
||||
{
|
||||
spin_unlock_irqrestore(&port->lock, flags);
|
||||
break;
|
||||
}
|
||||
|
||||
spin_unlock_irqrestore(&port->lock, flags);
|
||||
|
||||
|
||||