Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 42919
b: refs/heads/master
c: f29219f
h: refs/heads/master
i:
  42917: 693e20c
  42915: 9e18ea9
  42911: 04ce238
v: v3
  • Loading branch information
Mike Galbraith authored and Linus Torvalds committed Dec 7, 2006
1 parent 84714ad commit 0ebb3d6
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 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: aaeab80bdbc0d10a98adc6fa76c29ca2f1816553
refs/heads/master: f29219f17ae46cc182123bc7d2089b69869935ae
29 changes: 28 additions & 1 deletion trunk/drivers/serial/8250_pnp.c
Original file line number Diff line number Diff line change
Expand Up @@ -464,11 +464,38 @@ static void __devexit serial_pnp_remove(struct pnp_dev *dev)
serial8250_unregister_port(line - 1);
}

#ifdef CONFIG_PM
static int serial_pnp_suspend(struct pnp_dev *dev, pm_message_t state)
{
long line = (long)pnp_get_drvdata(dev);

if (!line)
return -ENODEV;
serial8250_suspend_port(line - 1);
return 0;
}

static int serial_pnp_resume(struct pnp_dev *dev)
{
long line = (long)pnp_get_drvdata(dev);

if (!line)
return -ENODEV;
serial8250_resume_port(line - 1);
return 0;
}
#else
#define serial_pnp_suspend NULL
#define serial_pnp_resume NULL
#endif /* CONFIG_PM */

static struct pnp_driver serial_pnp_driver = {
.name = "serial",
.id_table = pnp_dev_table,
.probe = serial_pnp_probe,
.remove = __devexit_p(serial_pnp_remove),
.suspend = serial_pnp_suspend,
.resume = serial_pnp_resume,
.id_table = pnp_dev_table,
};

static int __init serial8250_pnp_init(void)
Expand Down

0 comments on commit 0ebb3d6

Please sign in to comment.