aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-04-27 15:58:54 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-04-27 15:58:54 -0400
commitd868772fff6c4b881d66af8640251714e1aefa98 (patch)
treec95a68d358d5c875d25763ffe9a44fe9f2081f34 /kernel
parenta205752d1ad2d37d6597aaae5a56fc396a770868 (diff)
parent404d5b185b4eb56d6fa2f7bd27833f8df1c38ce4 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6: (46 commits) dev_dbg: check dev_dbg() arguments drivers/base/attribute_container.c: use mutex instead of binary semaphore mod_sysfs_setup() doesn't return errno when kobject_add_dir() failure occurs s2ram: add arch irq disable/enable hooks define platform wakeup hook, use in pci_enable_wake() security: prevent permission checking of file removal via sysfs_remove_group() device_schedule_callback() needs a module reference s390: cio: Delay uevents for subchannels sysfs: bin.c printk fix Driver core: use mutex instead of semaphore in DMA pool handler driver core: bus_add_driver should return an error if no bus debugfs: Add debugfs_create_u64() the overdue removal of the mount/umount uevents kobject: Comment and warning fixes to kobject.c Driver core: warn when userspace writes to the uevent file in a non-supported way Driver core: make uevent-environment available in uevent-file kobject core: remove rwsem from struct subsystem qeth: Remove usage of subsys.rwsem PHY: remove rwsem use from phy core IEEE1394: remove rwsem use from ieee1394 core ...
Diffstat (limited to 'kernel')
-rw-r--r--kernel/module.c4
-rw-r--r--kernel/power/main.c18
2 files changed, 18 insertions, 4 deletions
diff --git a/kernel/module.c b/kernel/module.c
index dcdb32b8b13c..9da5af668a20 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -1148,8 +1148,10 @@ int mod_sysfs_setup(struct module *mod,
1148 goto out; 1148 goto out;
1149 1149
1150 mod->holders_dir = kobject_add_dir(&mod->mkobj.kobj, "holders"); 1150 mod->holders_dir = kobject_add_dir(&mod->mkobj.kobj, "holders");
1151 if (!mod->holders_dir) 1151 if (!mod->holders_dir) {
1152 err = -ENOMEM;
1152 goto out_unreg; 1153 goto out_unreg;
1154 }
1153 1155
1154 err = module_param_sysfs_setup(mod, kparam, num_params); 1156 err = module_param_sysfs_setup(mod, kparam, num_params);
1155 if (err) 1157 if (err)
diff --git a/kernel/power/main.c b/kernel/power/main.c
index a064dfd8877a..3062e940d1fa 100644
--- a/kernel/power/main.c
+++ b/kernel/power/main.c
@@ -111,13 +111,24 @@ static int suspend_prepare(suspend_state_t state)
111 return error; 111 return error;
112} 112}
113 113
114/* default implementation */
115void __attribute__ ((weak)) arch_suspend_disable_irqs(void)
116{
117 local_irq_disable();
118}
119
120/* default implementation */
121void __attribute__ ((weak)) arch_suspend_enable_irqs(void)
122{
123 local_irq_enable();
124}
114 125
115int suspend_enter(suspend_state_t state) 126int suspend_enter(suspend_state_t state)
116{ 127{
117 int error = 0; 128 int error = 0;
118 unsigned long flags;
119 129
120 local_irq_save(flags); 130 arch_suspend_disable_irqs();
131 BUG_ON(!irqs_disabled());
121 132
122 if ((error = device_power_down(PMSG_SUSPEND))) { 133 if ((error = device_power_down(PMSG_SUSPEND))) {
123 printk(KERN_ERR "Some devices failed to power down\n"); 134 printk(KERN_ERR "Some devices failed to power down\n");
@@ -126,7 +137,8 @@ int suspend_enter(suspend_state_t state)
126 error = pm_ops->enter(state); 137 error = pm_ops->enter(state);
127 device_power_up(); 138 device_power_up();
128 Done: 139 Done:
129 local_irq_restore(flags); 140 arch_suspend_enable_irqs();
141 BUG_ON(irqs_disabled());
130 return error; 142 return error;
131} 143}
132 144