Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 48320
b: refs/heads/master
c: 3689a0e
h: refs/heads/master
v: v3
  • Loading branch information
George G. Davis authored and Linus Torvalds committed Feb 14, 2007
1 parent 5c3f9e5 commit b49b976
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9b22271d4b8c1be8a81563c322d3f04e7cbe2153
refs/heads/master: 3689a0ec60bc8f56cc372c1dfa0d89dab48f7c9c
11 changes: 11 additions & 0 deletions trunk/drivers/serial/serial_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1660,6 +1660,7 @@ static const char *uart_type(struct uart_port *port)
static int uart_line_info(char *buf, struct uart_driver *drv, int i)
{
struct uart_state *state = drv->state + i;
int pm_state;
struct uart_port *port = state->port;
char stat_buf[32];
unsigned int status;
Expand All @@ -1682,9 +1683,16 @@ static int uart_line_info(char *buf, struct uart_driver *drv, int i)

if(capable(CAP_SYS_ADMIN))
{
mutex_lock(&state->mutex);
pm_state = state->pm_state;
if (pm_state)
uart_change_pm(state, 0);
spin_lock_irq(&port->lock);
status = port->ops->get_mctrl(port);
spin_unlock_irq(&port->lock);
if (pm_state)
uart_change_pm(state, pm_state);
mutex_unlock(&state->mutex);

ret += sprintf(buf + ret, " tx:%d rx:%d",
port->icount.tx, port->icount.rx);
Expand Down Expand Up @@ -2100,6 +2108,9 @@ uart_configure_port(struct uart_driver *drv, struct uart_state *state,

uart_report_port(drv, port);

/* Power up port for set_mctrl() */
uart_change_pm(state, 0);

/*
* Ensure that the modem control lines are de-activated.
* We probably don't need a spinlock around this, but
Expand Down

0 comments on commit b49b976

Please sign in to comment.