aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorPavel Machek <pavel@ucw.cz>2005-09-03 18:56:57 -0400
committerLinus Torvalds <torvalds@evo.osdl.org>2005-09-05 03:06:16 -0400
commitca078bae813dd46c0f9b102fdfb4a3384641ff48 (patch)
treee3348f5dcb24159a522941aa2e3ee40bc9e0589b /drivers/net
parent829ca9a30a2ddb727981d80fabdbff2ea86bc9ea (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')
-rw-r--r--drivers/net/irda/vlsi_ir.c10
-rw-r--r--drivers/net/wireless/airo.c10
2 files changed, 10 insertions, 10 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;
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index 6db1fb6461de..abac1e40154b 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -2239,7 +2239,7 @@ static void airo_read_stats(struct airo_info *ai) {
2239 u32 *vals = stats_rid.vals; 2239 u32 *vals = stats_rid.vals;
2240 2240
2241 clear_bit(JOB_STATS, &ai->flags); 2241 clear_bit(JOB_STATS, &ai->flags);
2242 if (ai->power) { 2242 if (ai->power.event) {
2243 up(&ai->sem); 2243 up(&ai->sem);
2244 return; 2244 return;
2245 } 2245 }
@@ -2969,7 +2969,7 @@ static int airo_thread(void *data) {
2969 break; 2969 break;
2970 } 2970 }
2971 2971
2972 if (ai->power || test_bit(FLAG_FLASHING, &ai->flags)) { 2972 if (ai->power.event || test_bit(FLAG_FLASHING, &ai->flags)) {
2973 up(&ai->sem); 2973 up(&ai->sem);
2974 continue; 2974 continue;
2975 } 2975 }
@@ -5521,7 +5521,7 @@ static int airo_pci_resume(struct pci_dev *pdev)
5521 pci_restore_state(pdev); 5521 pci_restore_state(pdev);
5522 pci_enable_wake(pdev, pci_choose_state(pdev, ai->power), 0); 5522 pci_enable_wake(pdev, pci_choose_state(pdev, ai->power), 0);
5523 5523
5524 if (ai->power > 1) { 5524 if (ai->power.event > 1) {
5525 reset_card(dev, 0); 5525 reset_card(dev, 0);
5526 mpi_init_descriptors(ai); 5526 mpi_init_descriptors(ai);
5527 setup_card(ai, dev->dev_addr, 0); 5527 setup_card(ai, dev->dev_addr, 0);
@@ -7123,7 +7123,7 @@ static int airo_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
7123 int rc = 0; 7123 int rc = 0;
7124 struct airo_info *ai = (struct airo_info *)dev->priv; 7124 struct airo_info *ai = (struct airo_info *)dev->priv;
7125 7125
7126 if (ai->power) 7126 if (ai->power.event)
7127 return 0; 7127 return 0;
7128 7128
7129 switch (cmd) { 7129 switch (cmd) {
@@ -7202,7 +7202,7 @@ static void airo_read_wireless_stats(struct airo_info *local)
7202 7202
7203 /* Get stats out of the card */ 7203 /* Get stats out of the card */
7204 clear_bit(JOB_WSTATS, &local->flags); 7204 clear_bit(JOB_WSTATS, &local->flags);
7205 if (local->power) { 7205 if (local->power.event) {
7206 up(&local->sem); 7206 up(&local->sem);
7207 return; 7207 return;
7208 } 7208 }