[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>
This commit is contained in:
Pavel Machek
2005-09-03 15:56:57 -07:00
committed by Linus Torvalds
parent 829ca9a30a
commit ca078bae81
28 changed files with 108 additions and 101 deletions

View File

@@ -2239,7 +2239,7 @@ static void airo_read_stats(struct airo_info *ai) {
u32 *vals = stats_rid.vals;
clear_bit(JOB_STATS, &ai->flags);
if (ai->power) {
if (ai->power.event) {
up(&ai->sem);
return;
}
@@ -2969,7 +2969,7 @@ static int airo_thread(void *data) {
break;
}
if (ai->power || test_bit(FLAG_FLASHING, &ai->flags)) {
if (ai->power.event || test_bit(FLAG_FLASHING, &ai->flags)) {
up(&ai->sem);
continue;
}
@@ -5521,7 +5521,7 @@ static int airo_pci_resume(struct pci_dev *pdev)
pci_restore_state(pdev);
pci_enable_wake(pdev, pci_choose_state(pdev, ai->power), 0);
if (ai->power > 1) {
if (ai->power.event > 1) {
reset_card(dev, 0);
mpi_init_descriptors(ai);
setup_card(ai, dev->dev_addr, 0);
@@ -7123,7 +7123,7 @@ static int airo_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
int rc = 0;
struct airo_info *ai = (struct airo_info *)dev->priv;
if (ai->power)
if (ai->power.event)
return 0;
switch (cmd) {
@@ -7202,7 +7202,7 @@ static void airo_read_wireless_stats(struct airo_info *local)
/* Get stats out of the card */
clear_bit(JOB_WSTATS, &local->flags);
if (local->power) {
if (local->power.event) {
up(&local->sem);
return;
}