patch-2.4.4 linux/kernel/pm.c
Next file: linux/kernel/sched.c
Previous file: linux/kernel/ksyms.c
Back to the patch index
Back to the overall index
- Lines: 29
- Date:
Fri Apr 6 10:51:19 2001
- Orig file:
v2.4.3/linux/kernel/pm.c
- Orig date:
Tue Mar 6 19:44:37 2001
diff -u --recursive --new-file v2.4.3/linux/kernel/pm.c linux/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 @@
* 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 status = 0;
int prev_state, next_state;
+
+ if (in_interrupt())
+ BUG();
+
switch (rqst) {
case PM_SUSPEND:
case PM_RESUME:
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)