Skip to content

Commit 4335550

Browse files
YijingWangairlied
authored andcommitted
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>
1 parent c7d015f commit 4335550

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎drivers/char/agp/ati-agp.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,14 +236,14 @@ static int ati_configure(void)
236236
static int agp_ati_suspend(struct pci_dev *dev, pm_message_t state)
237237
{
238238
pci_save_state(dev);
239-
pci_set_power_state(dev, 3);
239+
pci_set_power_state(dev, PCI_D3hot);
240240

241241
return 0;
242242
}
243243

244244
static int agp_ati_resume(struct pci_dev *dev)
245245
{
246-
pci_set_power_state(dev, 0);
246+
pci_set_power_state(dev, PCI_D0);
247247
pci_restore_state(dev);
248248

249249
return ati_configure();

‎drivers/char/agp/nvidia-agp.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -399,16 +399,16 @@ static void agp_nvidia_remove(struct pci_dev *pdev)
399399
#ifdef CONFIG_PM
400400
static int agp_nvidia_suspend(struct pci_dev *pdev, pm_message_t state)
401401
{
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);
404404

405405
return 0;
406406
}
407407

408408
static int agp_nvidia_resume(struct pci_dev *pdev)
409409
{
410410
/* set power state 0 and restore PCI space */
411-
pci_set_power_state (pdev, 0);
411+
pci_set_power_state(pdev, PCI_D0);
412412
pci_restore_state(pdev);
413413

414414
/* reconfigure AGP hardware again */

0 commit comments

Comments
 (0)