Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

char/agp: replace numeric with standard PM state macros

Use standard PM state macros PCI_Dx instead of numeric 0/1/2..

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>

authored by

Yijing Wang and committed by
Dave Airlie
43355503 c7d015f3

+5 -5
+2 -2
drivers/char/agp/ati-agp.c
··· 236 236 static int agp_ati_suspend(struct pci_dev *dev, pm_message_t state) 237 237 { 238 238 pci_save_state(dev); 239 - pci_set_power_state(dev, 3); 239 + pci_set_power_state(dev, PCI_D3hot); 240 240 241 241 return 0; 242 242 } 243 243 244 244 static int agp_ati_resume(struct pci_dev *dev) 245 245 { 246 - pci_set_power_state(dev, 0); 246 + pci_set_power_state(dev, PCI_D0); 247 247 pci_restore_state(dev); 248 248 249 249 return ati_configure();
+3 -3
drivers/char/agp/nvidia-agp.c
··· 399 399 #ifdef CONFIG_PM 400 400 static int agp_nvidia_suspend(struct pci_dev *pdev, pm_message_t state) 401 401 { 402 - pci_save_state (pdev); 403 - pci_set_power_state (pdev, 3); 402 + pci_save_state(pdev); 403 + pci_set_power_state(pdev, PCI_D3hot); 404 404 405 405 return 0; 406 406 } ··· 408 408 static int agp_nvidia_resume(struct pci_dev *pdev) 409 409 { 410 410 /* set power state 0 and restore PCI space */ 411 - pci_set_power_state (pdev, 0); 411 + pci_set_power_state(pdev, PCI_D0); 412 412 pci_restore_state(pdev); 413 413 414 414 /* reconfigure AGP hardware again */