diff options
author | Len Brown <len.brown@intel.com> | 2006-06-29 19:57:46 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-06-29 19:57:46 -0400 |
commit | d120cfb544ed6161b9d32fb6c4648c471807ee6b (patch) | |
tree | 7757ad0198d8df76ff5c60f939a687687c41da00 /drivers/char/agp/nvidia-agp.c | |
parent | 9dce0e950dbfab4148f35ac6f297d8638cdc63c4 (diff) | |
parent | bf7e8511088963078484132636839b59e25cf14f (diff) |
merge linus into release branch
Conflicts:
drivers/acpi/acpi_memhotplug.c
Diffstat (limited to 'drivers/char/agp/nvidia-agp.c')
-rw-r--r-- | drivers/char/agp/nvidia-agp.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/drivers/char/agp/nvidia-agp.c b/drivers/char/agp/nvidia-agp.c index 4c67135c12d8..df7f37b2739a 100644 --- a/drivers/char/agp/nvidia-agp.c +++ b/drivers/char/agp/nvidia-agp.c | |||
@@ -376,6 +376,29 @@ static void __devexit agp_nvidia_remove(struct pci_dev *pdev) | |||
376 | agp_put_bridge(bridge); | 376 | agp_put_bridge(bridge); |
377 | } | 377 | } |
378 | 378 | ||
379 | #ifdef CONFIG_PM | ||
380 | static int agp_nvidia_suspend(struct pci_dev *pdev, pm_message_t state) | ||
381 | { | ||
382 | pci_save_state (pdev); | ||
383 | pci_set_power_state (pdev, 3); | ||
384 | |||
385 | return 0; | ||
386 | } | ||
387 | |||
388 | static int agp_nvidia_resume(struct pci_dev *pdev) | ||
389 | { | ||
390 | /* set power state 0 and restore PCI space */ | ||
391 | pci_set_power_state (pdev, 0); | ||
392 | pci_restore_state(pdev); | ||
393 | |||
394 | /* reconfigure AGP hardware again */ | ||
395 | nvidia_configure(); | ||
396 | |||
397 | return 0; | ||
398 | } | ||
399 | #endif | ||
400 | |||
401 | |||
379 | static struct pci_device_id agp_nvidia_pci_table[] = { | 402 | static struct pci_device_id agp_nvidia_pci_table[] = { |
380 | { | 403 | { |
381 | .class = (PCI_CLASS_BRIDGE_HOST << 8), | 404 | .class = (PCI_CLASS_BRIDGE_HOST << 8), |
@@ -403,6 +426,10 @@ static struct pci_driver agp_nvidia_pci_driver = { | |||
403 | .id_table = agp_nvidia_pci_table, | 426 | .id_table = agp_nvidia_pci_table, |
404 | .probe = agp_nvidia_probe, | 427 | .probe = agp_nvidia_probe, |
405 | .remove = agp_nvidia_remove, | 428 | .remove = agp_nvidia_remove, |
429 | #ifdef CONFIG_PM | ||
430 | .suspend = agp_nvidia_suspend, | ||
431 | .resume = agp_nvidia_resume, | ||
432 | #endif | ||
406 | }; | 433 | }; |
407 | 434 | ||
408 | static int __init agp_nvidia_init(void) | 435 | static int __init agp_nvidia_init(void) |