diff options
-rw-r--r-- | 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 aaa1883f076c..6cf54fe60207 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) | |||
214 | agp_put_bridge(bridge); | 214 | agp_put_bridge(bridge); |
215 | } | 215 | } |
216 | 216 | ||
217 | #ifdef CONFIG_PM | ||
218 | |||
219 | static int agp_sis_suspend(struct pci_dev *pdev, pm_message_t state) | ||
220 | { | ||
221 | pci_save_state(pdev); | ||
222 | pci_set_power_state(pdev, pci_choose_state(pdev, state)); | ||
223 | |||
224 | return 0; | ||
225 | } | ||
226 | |||
227 | static int agp_sis_resume(struct pci_dev *pdev) | ||
228 | { | ||
229 | pci_set_power_state(pdev, PCI_D0); | ||
230 | pci_restore_state(pdev); | ||
231 | |||
232 | return sis_driver.configure(); | ||
233 | } | ||
234 | |||
235 | #endif /* CONFIG_PM */ | ||
236 | |||
217 | static struct pci_device_id agp_sis_pci_table[] = { | 237 | static struct pci_device_id agp_sis_pci_table[] = { |
218 | { | 238 | { |
219 | .class = (PCI_CLASS_BRIDGE_HOST << 8), | 239 | .class = (PCI_CLASS_BRIDGE_HOST << 8), |
@@ -393,6 +413,10 @@ static struct pci_driver agp_sis_pci_driver = { | |||
393 | .id_table = agp_sis_pci_table, | 413 | .id_table = agp_sis_pci_table, |
394 | .probe = agp_sis_probe, | 414 | .probe = agp_sis_probe, |
395 | .remove = agp_sis_remove, | 415 | .remove = agp_sis_remove, |
416 | #ifdef CONFIG_PM | ||
417 | .suspend = agp_sis_suspend, | ||
418 | .resume = agp_sis_resume, | ||
419 | #endif | ||
396 | }; | 420 | }; |
397 | 421 | ||
398 | static int __init agp_sis_init(void) | 422 | static int __init agp_sis_init(void) |