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/net/irda/vlsi_ir.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/net/irda/vlsi_ir.c')
-rw-r--r-- | drivers/net/irda/vlsi_ir.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/irda/vlsi_ir.c b/drivers/net/irda/vlsi_ir.c index 4be95398bac4..6d9de626c967 100644 --- a/drivers/net/irda/vlsi_ir.c +++ b/drivers/net/irda/vlsi_ir.c | |||
@@ -1757,12 +1757,12 @@ static int vlsi_irda_suspend(struct pci_dev *pdev, pm_message_t state) | |||
1757 | idev = ndev->priv; | 1757 | idev = ndev->priv; |
1758 | down(&idev->sem); | 1758 | down(&idev->sem); |
1759 | if (pdev->current_state != 0) { /* already suspended */ | 1759 | if (pdev->current_state != 0) { /* already suspended */ |
1760 | if (state > pdev->current_state) { /* simply go deeper */ | 1760 | if (state.event > pdev->current_state) { /* simply go deeper */ |
1761 | pci_set_power_state(pdev,state); | 1761 | pci_set_power_state(pdev, pci_choose_state(pdev, state)); |
1762 | pdev->current_state = state; | 1762 | pdev->current_state = state.event; |
1763 | } | 1763 | } |
1764 | else | 1764 | else |
1765 | IRDA_ERROR("%s - %s: invalid suspend request %u -> %u\n", __FUNCTION__, PCIDEV_NAME(pdev), pdev->current_state, state); | 1765 | IRDA_ERROR("%s - %s: invalid suspend request %u -> %u\n", __FUNCTION__, PCIDEV_NAME(pdev), pdev->current_state, state.event); |
1766 | up(&idev->sem); | 1766 | up(&idev->sem); |
1767 | return 0; | 1767 | return 0; |
1768 | } | 1768 | } |
@@ -1777,7 +1777,7 @@ static int vlsi_irda_suspend(struct pci_dev *pdev, pm_message_t state) | |||
1777 | } | 1777 | } |
1778 | 1778 | ||
1779 | pci_set_power_state(pdev, pci_choose_state(pdev, state)); | 1779 | pci_set_power_state(pdev, pci_choose_state(pdev, state)); |
1780 | pdev->current_state = state; | 1780 | pdev->current_state = state.event; |
1781 | idev->resume_ok = 1; | 1781 | idev->resume_ok = 1; |
1782 | up(&idev->sem); | 1782 | up(&idev->sem); |
1783 | return 0; | 1783 | return 0; |