diff options
| author | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 18:07:03 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 18:07:03 -0800 |
| commit | 3544b3289d633721041f6d96d0efee8f79cd435b (patch) | |
| tree | a5b201286eb880200347c923b115a19b97b7ff3d /kernel/pm.c | |
| parent | 27c07b258df990ce981108198eca19b2512a202a (diff) | |
v2.4.3 -> v2.4.3.1
- Bob Tracy: Cyrix MTRR setup fix (don't make it twice as big as asked
for)
- Trond Myklebust: rpciod needs to be PF_MEMALLOC to avoid deadlocks on
memory allocation when writing out NFS data under low memory conditions.
Fix up BKL and RPC interactions.
- Jeff Garzik: tulip network driver update
- fix truncate to call down to the filesystem with the kernel lock.
- David Mosberger: ia64 update
- David Mosberger: simplify ELF program header generation.
- Alan Cox: merge from -ac series
- Jeff Garzik: make serial.c recognize modem devices properly
Diffstat (limited to 'kernel/pm.c')
| -rw-r--r-- | kernel/pm.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/pm.c b/kernel/pm.c index a520cae1595f..b5ff82ce13ab 100644 --- a/kernel/pm.c +++ b/kernel/pm.c @@ -22,6 +22,7 @@ #include <linux/spinlock.h> #include <linux/slab.h> #include <linux/pm.h> +#include <linux/interrupt.h> int pm_active; @@ -49,6 +50,9 @@ static LIST_HEAD(pm_devs); * Add a device to the list of devices that wish to be notified about * power management events. A &pm_dev structure is returned on success, * on failure the return is %NULL. + * + * The callback function will be called in process context and + * it may sleep. */ struct pm_dev *pm_register(pm_dev_t type, @@ -150,6 +154,10 @@ int pm_send(struct pm_dev *dev, pm_request_t rqst, void *data) { int status = 0; int prev_state, next_state; + + if (in_interrupt()) + BUG(); + switch (rqst) { case PM_SUSPEND: case PM_RESUME: |
