Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 227076
b: refs/heads/master
c: 3f960db
h: refs/heads/master
v: v3
  • Loading branch information
Govindraj.R authored and Greg Kroah-Hartman committed Dec 16, 2010
1 parent 9746323 commit 34a5560
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 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: 6ce5b1ce5f6922db32599e73bcb22f5cdcbf241f
refs/heads/master: 3f960dbb9dfe29ff283810624c4340c79fde87f5
8 changes: 6 additions & 2 deletions trunk/drivers/serial/serial_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1986,7 +1986,8 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *uport)

tty_dev = device_find_child(uport->dev, &match, serial_match_port);
if (device_may_wakeup(tty_dev)) {
enable_irq_wake(uport->irq);
if (!enable_irq_wake(uport->irq))
uport->irq_wake = 1;
put_device(tty_dev);
mutex_unlock(&port->mutex);
return 0;
Expand Down Expand Up @@ -2052,7 +2053,10 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *uport)

tty_dev = device_find_child(uport->dev, &match, serial_match_port);
if (!uport->suspended && device_may_wakeup(tty_dev)) {
disable_irq_wake(uport->irq);
if (uport->irq_wake) {
disable_irq_wake(uport->irq);
uport->irq_wake = 0;
}
mutex_unlock(&port->mutex);
return 0;
}
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/serial_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ struct uart_port {
struct device *dev; /* parent device */
unsigned char hub6; /* this should be in the 8250 driver */
unsigned char suspended;
unsigned char irq_wake;
unsigned char unused[2];
void *private_data; /* generic platform data pointer */
};
Expand Down

0 comments on commit 34a5560

Please sign in to comment.