diff options
Diffstat (limited to 'drivers/video/aty/aty128fb.c')
-rw-r--r-- | drivers/video/aty/aty128fb.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c index 7bc1d44d8814..b0eba3ac6420 100644 --- a/drivers/video/aty/aty128fb.c +++ b/drivers/video/aty/aty128fb.c | |||
@@ -2323,17 +2323,16 @@ static int aty128_pci_suspend(struct pci_dev *pdev, pm_message_t state) | |||
2323 | * can properly take care of D3 ? Also, with swsusp, we | 2323 | * can properly take care of D3 ? Also, with swsusp, we |
2324 | * know we'll be rebooted, ... | 2324 | * know we'll be rebooted, ... |
2325 | */ | 2325 | */ |
2326 | #ifdef CONFIG_PPC_PMAC | 2326 | #ifndef CONFIG_PPC_PMAC |
2327 | /* HACK ALERT ! Once I find a proper way to say to each driver | 2327 | /* HACK ALERT ! Once I find a proper way to say to each driver |
2328 | * individually what will happen with it's PCI slot, I'll change | 2328 | * individually what will happen with it's PCI slot, I'll change |
2329 | * that. On laptops, the AGP slot is just unclocked, so D2 is | 2329 | * that. On laptops, the AGP slot is just unclocked, so D2 is |
2330 | * expected, while on desktops, the card is powered off | 2330 | * expected, while on desktops, the card is powered off |
2331 | */ | 2331 | */ |
2332 | if (state >= 3) | 2332 | return 0; |
2333 | state = 2; | ||
2334 | #endif /* CONFIG_PPC_PMAC */ | 2333 | #endif /* CONFIG_PPC_PMAC */ |
2335 | 2334 | ||
2336 | if (state != 2 || state == pdev->dev.power.power_state) | 2335 | if (state.event == pdev->dev.power.power_state.event) |
2337 | return 0; | 2336 | return 0; |
2338 | 2337 | ||
2339 | printk(KERN_DEBUG "aty128fb: suspending...\n"); | 2338 | printk(KERN_DEBUG "aty128fb: suspending...\n"); |
@@ -2367,7 +2366,7 @@ static int aty128_pci_suspend(struct pci_dev *pdev, pm_message_t state) | |||
2367 | * used dummy fb ops, 2.5 need proper support for this at the | 2366 | * used dummy fb ops, 2.5 need proper support for this at the |
2368 | * fbdev level | 2367 | * fbdev level |
2369 | */ | 2368 | */ |
2370 | if (state == 2) | 2369 | if (state.event != PM_EVENT_ON) |
2371 | aty128_set_suspend(par, 1); | 2370 | aty128_set_suspend(par, 1); |
2372 | 2371 | ||
2373 | release_console_sem(); | 2372 | release_console_sem(); |
@@ -2382,12 +2381,11 @@ static int aty128_do_resume(struct pci_dev *pdev) | |||
2382 | struct fb_info *info = pci_get_drvdata(pdev); | 2381 | struct fb_info *info = pci_get_drvdata(pdev); |
2383 | struct aty128fb_par *par = info->par; | 2382 | struct aty128fb_par *par = info->par; |
2384 | 2383 | ||
2385 | if (pdev->dev.power.power_state == 0) | 2384 | if (pdev->dev.power.power_state.event == PM_EVENT_ON) |
2386 | return 0; | 2385 | return 0; |
2387 | 2386 | ||
2388 | /* Wakeup chip */ | 2387 | /* Wakeup chip */ |
2389 | if (pdev->dev.power.power_state == 2) | 2388 | aty128_set_suspend(par, 0); |
2390 | aty128_set_suspend(par, 0); | ||
2391 | par->asleep = 0; | 2389 | par->asleep = 0; |
2392 | 2390 | ||
2393 | /* Restore display & engine */ | 2391 | /* Restore display & engine */ |