diff options
| author | Greg KH <greg@press.(none)> | 2005-06-30 01:54:31 -0400 | 
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-06-30 01:54:31 -0400 | 
| commit | bf164c790deb79b18faf304b0763e44a02c79f90 (patch) | |
| tree | 8fedcdce1f65aa6bc98fea0da6227d3fc0fc51fd /drivers/serial/ip22zilog.c | |
| parent | d62c0f9fd2d3943a3eca85b490d86e1605000ccb (diff) | |
| parent | 9b4311eedb17fa88f02e4876cd6aa9a08e383cd6 (diff) | |
Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/serial/ip22zilog.c')
| -rw-r--r-- | drivers/serial/ip22zilog.c | 13 | 
1 files changed, 7 insertions, 6 deletions
| diff --git a/drivers/serial/ip22zilog.c b/drivers/serial/ip22zilog.c index 3ea46c069f6f..ea5bf4d4daa3 100644 --- a/drivers/serial/ip22zilog.c +++ b/drivers/serial/ip22zilog.c | |||
| @@ -518,27 +518,28 @@ static irqreturn_t ip22zilog_interrupt(int irq, void *dev_id, struct pt_regs *re | |||
| 518 | static __inline__ unsigned char ip22zilog_read_channel_status(struct uart_port *port) | 518 | static __inline__ unsigned char ip22zilog_read_channel_status(struct uart_port *port) | 
| 519 | { | 519 | { | 
| 520 | struct zilog_channel *channel; | 520 | struct zilog_channel *channel; | 
| 521 | unsigned long flags; | ||
| 522 | unsigned char status; | 521 | unsigned char status; | 
| 523 | 522 | ||
| 524 | spin_lock_irqsave(&port->lock, flags); | ||
| 525 | |||
| 526 | channel = ZILOG_CHANNEL_FROM_PORT(port); | 523 | channel = ZILOG_CHANNEL_FROM_PORT(port); | 
| 527 | status = readb(&channel->control); | 524 | status = readb(&channel->control); | 
| 528 | ZSDELAY(); | 525 | ZSDELAY(); | 
| 529 | 526 | ||
| 530 | spin_unlock_irqrestore(&port->lock, flags); | ||
| 531 | |||
| 532 | return status; | 527 | return status; | 
| 533 | } | 528 | } | 
| 534 | 529 | ||
| 535 | /* The port lock is not held. */ | 530 | /* The port lock is not held. */ | 
| 536 | static unsigned int ip22zilog_tx_empty(struct uart_port *port) | 531 | static unsigned int ip22zilog_tx_empty(struct uart_port *port) | 
| 537 | { | 532 | { | 
| 533 | unsigned long flags; | ||
| 538 | unsigned char status; | 534 | unsigned char status; | 
| 539 | unsigned int ret; | 535 | unsigned int ret; | 
| 540 | 536 | ||
| 537 | spin_lock_irqsave(&port->lock, flags); | ||
| 538 | |||
| 541 | status = ip22zilog_read_channel_status(port); | 539 | status = ip22zilog_read_channel_status(port); | 
| 540 | |||
| 541 | spin_unlock_irqrestore(&port->lock, flags); | ||
| 542 | |||
| 542 | if (status & Tx_BUF_EMP) | 543 | if (status & Tx_BUF_EMP) | 
| 543 | ret = TIOCSER_TEMT; | 544 | ret = TIOCSER_TEMT; | 
| 544 | else | 545 | else | 
| @@ -547,7 +548,7 @@ static unsigned int ip22zilog_tx_empty(struct uart_port *port) | |||
| 547 | return ret; | 548 | return ret; | 
| 548 | } | 549 | } | 
| 549 | 550 | ||
| 550 | /* The port lock is not held. */ | 551 | /* The port lock is held and interrupts are disabled. */ | 
| 551 | static unsigned int ip22zilog_get_mctrl(struct uart_port *port) | 552 | static unsigned int ip22zilog_get_mctrl(struct uart_port *port) | 
| 552 | { | 553 | { | 
| 553 | unsigned char status; | 554 | unsigned char status; | 
