Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 289276
b: refs/heads/master
c: 30c6c6b
h: refs/heads/master
v: v3
  • Loading branch information
Feng Tang authored and Greg Kroah-Hartman committed Feb 9, 2012
1 parent a384d87 commit f1d492b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d011411ddb294e90511211a9edfc79da1c0465dc
refs/heads/master: 30c6c6b5bf82d4f4a23235a0aa0657681d1c21f2
29 changes: 8 additions & 21 deletions trunk/drivers/tty/serial/pch_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,14 +373,6 @@ static void pch_uart_hal_request(struct pci_dev *pdev, int fifosize,
priv->fcr = 0;
}

static unsigned int get_msr(struct eg20t_port *priv, void __iomem *base)
{
unsigned int msr = ioread8(base + UART_MSR);
priv->dmsr |= msr & PCH_UART_MSR_DELTA;

return msr;
}

static void pch_uart_hal_enable_interrupt(struct eg20t_port *priv,
unsigned int flag)
{
Expand Down Expand Up @@ -514,8 +506,9 @@ static int pch_uart_hal_set_fifo(struct eg20t_port *priv,

static u8 pch_uart_hal_get_modem(struct eg20t_port *priv)
{
priv->dmsr = 0;
return get_msr(priv, priv->membase);
unsigned int msr = ioread8(priv->membase + UART_MSR);
priv->dmsr = msr & PCH_UART_MSR_DELTA;
return (u8)msr;
}

static void pch_uart_hal_write(struct eg20t_port *priv,
Expand Down Expand Up @@ -596,7 +589,7 @@ static int push_rx(struct eg20t_port *priv, const unsigned char *buf,

static int pop_tx_x(struct eg20t_port *priv, unsigned char *buf)
{
int ret;
int ret = 0;
struct uart_port *port = &priv->port;

if (port->x_char) {
Expand All @@ -605,8 +598,6 @@ static int pop_tx_x(struct eg20t_port *priv, unsigned char *buf)
buf[0] = port->x_char;
port->x_char = 0;
ret = 1;
} else {
ret = 0;
}

return ret;
Expand Down Expand Up @@ -1104,14 +1095,12 @@ static irqreturn_t pch_uart_interrupt(int irq, void *dev_id)
static unsigned int pch_uart_tx_empty(struct uart_port *port)
{
struct eg20t_port *priv;
int ret;

priv = container_of(port, struct eg20t_port, port);
if (priv->tx_empty)
ret = TIOCSER_TEMT;
return TIOCSER_TEMT;
else
ret = 0;

return ret;
return 0;
}

/* Returns the current state of modem control inputs. */
Expand Down Expand Up @@ -1345,9 +1334,8 @@ static void pch_uart_set_termios(struct uart_port *port,
else
parity = PCH_UART_HAL_PARITY_EVEN;

} else {
} else
parity = PCH_UART_HAL_PARITY_NONE;
}

/* Only UART0 has auto hardware flow function */
if ((termios->c_cflag & CRTSCTS) && (priv->fifo_size == 256))
Expand Down Expand Up @@ -1519,7 +1507,6 @@ static void
pch_console_write(struct console *co, const char *s, unsigned int count)
{
struct eg20t_port *priv;

unsigned long flags;
u8 ier;
int locked = 1;
Expand Down

0 comments on commit f1d492b

Please sign in to comment.