Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 6911
b: refs/heads/master
c: 638861d
h: refs/heads/master
i:
  6909: 5304f78
  6907: 276cc4b
  6903: 4932060
  6895: 6412661
  6879: 398a05b
  6847: 079764d
  6783: 9ffc87e
  6655: 62d18c7
v: v3
  • Loading branch information
Kumar Gala authored and Linus Torvalds committed Sep 5, 2005
1 parent 492cf85 commit ff99ccf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 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: 0d8ba1a9793302fdcee3d6d4133c455023ca8ce9
refs/heads/master: 638861d54eec6b04a88d5d8df8b790d87de80b8d
13 changes: 7 additions & 6 deletions trunk/drivers/serial/cpm_uart/cpm_uart_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,10 +403,8 @@ static int cpm_uart_startup(struct uart_port *port)

inline void cpm_uart_wait_until_send(struct uart_cpm_port *pinfo)
{
unsigned long target_jiffies = jiffies + pinfo->wait_closing;

while (!time_after(jiffies, target_jiffies))
schedule();
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(pinfo->wait_closing);
}

/*
Expand All @@ -425,9 +423,12 @@ static void cpm_uart_shutdown(struct uart_port *port)
/* If the port is not the console, disable Rx and Tx. */
if (!(pinfo->flags & FLAG_CONSOLE)) {
/* Wait for all the BDs marked sent */
while(!cpm_uart_tx_empty(port))
while(!cpm_uart_tx_empty(port)) {
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(2);
if(pinfo->wait_closing)
}

if (pinfo->wait_closing)
cpm_uart_wait_until_send(pinfo);

/* Stop uarts */
Expand Down

0 comments on commit ff99ccf

Please sign in to comment.