Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=16469a0ea0f6b7562eac98ebb8a7c41ce902d0b1 Commit: 16469a0ea0f6b7562eac98ebb8a7c41ce902d0b1 Parent: b7d0640f9229a9426ba9223796329c4f0cc4acb9 Author: Stuart Bennett <[EMAIL PROTECTED]> AuthorDate: Tue Jan 8 13:14:07 2008 +0000 Committer: Dave Airlie <[EMAIL PROTECTED]> CommitDate: Tue Feb 19 14:44:40 2008 +1000
agp/sis: Suspend support for SiS AGP Tested on M650 chipset Signed-off-by: Dave Airlie <[EMAIL PROTECTED]> --- drivers/char/agp/sis-agp.c | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-) diff --git a/drivers/char/agp/sis-agp.c b/drivers/char/agp/sis-agp.c index aaa1883..6cf54fe 100644 --- a/drivers/char/agp/sis-agp.c +++ b/drivers/char/agp/sis-agp.c @@ -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), @@ -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) - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html