diff options
author | Pavel Machek <pavel@ucw.cz> | 2005-09-03 18:56:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@evo.osdl.org> | 2005-09-05 03:06:16 -0400 |
commit | ca078bae813dd46c0f9b102fdfb4a3384641ff48 (patch) | |
tree | e3348f5dcb24159a522941aa2e3ee40bc9e0589b /drivers/video/aty/radeon_pm.c | |
parent | 829ca9a30a2ddb727981d80fabdbff2ea86bc9ea (diff) |
[PATCH] swsusp: switch pm_message_t to struct
This adds type-checking to pm_message_t, so that people can't confuse it
with int or u32. It also allows us to fix "disk yoyo" during suspend (disk
spinning down/up/down).
[We've tried that before; since that cpufreq problems were fixed and I've
tried make allyes config and fixed resulting damage.]
Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Alexander Nyberg <alexn@telia.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video/aty/radeon_pm.c')
-rw-r--r-- | drivers/video/aty/radeon_pm.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/video/aty/radeon_pm.c b/drivers/video/aty/radeon_pm.c index 98352af39325..59a1b6f85067 100644 --- a/drivers/video/aty/radeon_pm.c +++ b/drivers/video/aty/radeon_pm.c | |||
@@ -2526,18 +2526,18 @@ int radeonfb_pci_suspend(struct pci_dev *pdev, pm_message_t state) | |||
2526 | struct radeonfb_info *rinfo = info->par; | 2526 | struct radeonfb_info *rinfo = info->par; |
2527 | int i; | 2527 | int i; |
2528 | 2528 | ||
2529 | if (state == pdev->dev.power.power_state) | 2529 | if (state.event == pdev->dev.power.power_state.event) |
2530 | return 0; | 2530 | return 0; |
2531 | 2531 | ||
2532 | printk(KERN_DEBUG "radeonfb (%s): suspending to state: %d...\n", | 2532 | printk(KERN_DEBUG "radeonfb (%s): suspending to state: %d...\n", |
2533 | pci_name(pdev), state); | 2533 | pci_name(pdev), state.event); |
2534 | 2534 | ||
2535 | /* For suspend-to-disk, we cheat here. We don't suspend anything and | 2535 | /* For suspend-to-disk, we cheat here. We don't suspend anything and |
2536 | * let fbcon continue drawing until we are all set. That shouldn't | 2536 | * let fbcon continue drawing until we are all set. That shouldn't |
2537 | * really cause any problem at this point, provided that the wakeup | 2537 | * really cause any problem at this point, provided that the wakeup |
2538 | * code knows that any state in memory may not match the HW | 2538 | * code knows that any state in memory may not match the HW |
2539 | */ | 2539 | */ |
2540 | if (state != PM_SUSPEND_MEM) | 2540 | if (state.event == PM_EVENT_FREEZE) |
2541 | goto done; | 2541 | goto done; |
2542 | 2542 | ||
2543 | acquire_console_sem(); | 2543 | acquire_console_sem(); |
@@ -2616,7 +2616,7 @@ int radeonfb_pci_resume(struct pci_dev *pdev) | |||
2616 | struct radeonfb_info *rinfo = info->par; | 2616 | struct radeonfb_info *rinfo = info->par; |
2617 | int rc = 0; | 2617 | int rc = 0; |
2618 | 2618 | ||
2619 | if (pdev->dev.power.power_state == 0) | 2619 | if (pdev->dev.power.power_state.event == PM_EVENT_ON) |
2620 | return 0; | 2620 | return 0; |
2621 | 2621 | ||
2622 | if (rinfo->no_schedule) { | 2622 | if (rinfo->no_schedule) { |
@@ -2626,7 +2626,7 @@ int radeonfb_pci_resume(struct pci_dev *pdev) | |||
2626 | acquire_console_sem(); | 2626 | acquire_console_sem(); |
2627 | 2627 | ||
2628 | printk(KERN_DEBUG "radeonfb (%s): resuming from state: %d...\n", | 2628 | printk(KERN_DEBUG "radeonfb (%s): resuming from state: %d...\n", |
2629 | pci_name(pdev), pdev->dev.power.power_state); | 2629 | pci_name(pdev), pdev->dev.power.power_state.event); |
2630 | 2630 | ||
2631 | 2631 | ||
2632 | if (pci_enable_device(pdev)) { | 2632 | if (pci_enable_device(pdev)) { |
@@ -2637,7 +2637,7 @@ int radeonfb_pci_resume(struct pci_dev *pdev) | |||
2637 | } | 2637 | } |
2638 | pci_set_master(pdev); | 2638 | pci_set_master(pdev); |
2639 | 2639 | ||
2640 | if (pdev->dev.power.power_state == PM_SUSPEND_MEM) { | 2640 | if (pdev->dev.power.power_state.event == PM_EVENT_SUSPEND) { |
2641 | /* Wakeup chip. Check from config space if we were powered off | 2641 | /* Wakeup chip. Check from config space if we were powered off |
2642 | * (todo: additionally, check CLK_PIN_CNTL too) | 2642 | * (todo: additionally, check CLK_PIN_CNTL too) |
2643 | */ | 2643 | */ |