Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 86012
b: refs/heads/master
c: 16469a0
h: refs/heads/master
v: v3
  • Loading branch information
Stuart Bennett authored and Dave Airlie committed Feb 19, 2008
1 parent 8ad2b73 commit c14496e
Show file tree
Hide file tree
Showing 2 changed files with 25 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: b7d0640f9229a9426ba9223796329c4f0cc4acb9
refs/heads/master: 16469a0ea0f6b7562eac98ebb8a7c41ce902d0b1
24 changes: 24 additions & 0 deletions trunk/drivers/char/agp/sis-agp.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,26 @@ static void __devexit agp_sis_remove(struct pci_dev *pdev)
agp_put_bridge(bridge);
}

#ifdef CONFIG_PM

static int agp_sis_suspend(struct pci_dev *pdev, pm_message_t state)
{
pci_save_state(pdev);
pci_set_power_state(pdev, pci_choose_state(pdev, state));

return 0;
}

static int agp_sis_resume(struct pci_dev *pdev)
{
pci_set_power_state(pdev, PCI_D0);
pci_restore_state(pdev);

return sis_driver.configure();
}

#endif /* CONFIG_PM */

static struct pci_device_id agp_sis_pci_table[] = {
{
.class = (PCI_CLASS_BRIDGE_HOST << 8),
Expand Down Expand Up @@ -393,6 +413,10 @@ static struct pci_driver agp_sis_pci_driver = {
.id_table = agp_sis_pci_table,
.probe = agp_sis_probe,
.remove = agp_sis_remove,
#ifdef CONFIG_PM
.suspend = agp_sis_suspend,
.resume = agp_sis_resume,
#endif
};

static int __init agp_sis_init(void)
Expand Down

0 comments on commit c14496e

Please sign in to comment.