diff options
Diffstat (limited to 'drivers/char/agp/amd64-agp.c')
| -rw-r--r-- | drivers/char/agp/amd64-agp.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c index 810679dcbbb0..9964c508c111 100644 --- a/drivers/char/agp/amd64-agp.c +++ b/drivers/char/agp/amd64-agp.c | |||
| @@ -600,6 +600,26 @@ static void __devexit agp_amd64_remove(struct pci_dev *pdev) | |||
| 600 | agp_put_bridge(bridge); | 600 | agp_put_bridge(bridge); |
| 601 | } | 601 | } |
| 602 | 602 | ||
| 603 | #ifdef CONFIG_PM | ||
| 604 | |||
| 605 | static int agp_amd64_suspend(struct pci_dev *pdev, pm_message_t state) | ||
| 606 | { | ||
| 607 | pci_save_state(pdev); | ||
| 608 | pci_set_power_state(pdev, pci_choose_state(pdev, state)); | ||
| 609 | |||
| 610 | return 0; | ||
| 611 | } | ||
| 612 | |||
| 613 | static int agp_amd64_resume(struct pci_dev *pdev) | ||
| 614 | { | ||
| 615 | pci_set_power_state(pdev, PCI_D0); | ||
| 616 | pci_restore_state(pdev); | ||
| 617 | |||
| 618 | return amd_8151_configure(); | ||
| 619 | } | ||
| 620 | |||
| 621 | #endif /* CONFIG_PM */ | ||
| 622 | |||
| 603 | static struct pci_device_id agp_amd64_pci_table[] = { | 623 | static struct pci_device_id agp_amd64_pci_table[] = { |
| 604 | { | 624 | { |
| 605 | .class = (PCI_CLASS_BRIDGE_HOST << 8), | 625 | .class = (PCI_CLASS_BRIDGE_HOST << 8), |
| @@ -718,6 +738,10 @@ static struct pci_driver agp_amd64_pci_driver = { | |||
| 718 | .id_table = agp_amd64_pci_table, | 738 | .id_table = agp_amd64_pci_table, |
| 719 | .probe = agp_amd64_probe, | 739 | .probe = agp_amd64_probe, |
| 720 | .remove = agp_amd64_remove, | 740 | .remove = agp_amd64_remove, |
| 741 | #ifdef CONFIG_PM | ||
| 742 | .suspend = agp_amd64_suspend, | ||
| 743 | .resume = agp_amd64_resume, | ||
| 744 | #endif | ||
| 721 | }; | 745 | }; |
| 722 | 746 | ||
| 723 | 747 | ||
