aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/hpet.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-07-31 12:43:41 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-31 12:43:41 -0400
commit85e9ca333d03fbd56b9e123c8456f0d98e20faad (patch)
tree7bb15ada5f536950efa23ad60ea9eea60380ca1c /drivers/char/hpet.c
parenta300bec952127d9a15e666b391bb35c9aecb3002 (diff)
parent6e86841d05f371b5b9b86ce76c02aaee83352298 (diff)
Merge branch 'linus' into timers/hpet
Diffstat (limited to 'drivers/char/hpet.c')
-rw-r--r--drivers/char/hpet.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
index c9bf5d44402d..f3981ffe20f0 100644
--- a/drivers/char/hpet.c
+++ b/drivers/char/hpet.c
@@ -14,6 +14,7 @@
14#include <linux/interrupt.h> 14#include <linux/interrupt.h>
15#include <linux/module.h> 15#include <linux/module.h>
16#include <linux/kernel.h> 16#include <linux/kernel.h>
17#include <linux/smp_lock.h>
17#include <linux/types.h> 18#include <linux/types.h>
18#include <linux/miscdevice.h> 19#include <linux/miscdevice.h>
19#include <linux/major.h> 20#include <linux/major.h>
@@ -254,6 +255,7 @@ static int hpet_open(struct inode *inode, struct file *file)
254 if (file->f_mode & FMODE_WRITE) 255 if (file->f_mode & FMODE_WRITE)
255 return -EINVAL; 256 return -EINVAL;
256 257
258 lock_kernel();
257 spin_lock_irq(&hpet_lock); 259 spin_lock_irq(&hpet_lock);
258 260
259 for (devp = NULL, hpetp = hpets; hpetp && !devp; hpetp = hpetp->hp_next) 261 for (devp = NULL, hpetp = hpets; hpetp && !devp; hpetp = hpetp->hp_next)
@@ -268,6 +270,7 @@ static int hpet_open(struct inode *inode, struct file *file)
268 270
269 if (!devp) { 271 if (!devp) {
270 spin_unlock_irq(&hpet_lock); 272 spin_unlock_irq(&hpet_lock);
273 unlock_kernel();
271 return -EBUSY; 274 return -EBUSY;
272 } 275 }
273 276
@@ -275,6 +278,7 @@ static int hpet_open(struct inode *inode, struct file *file)
275 devp->hd_irqdata = 0; 278 devp->hd_irqdata = 0;
276 devp->hd_flags |= HPET_OPEN; 279 devp->hd_flags |= HPET_OPEN;
277 spin_unlock_irq(&hpet_lock); 280 spin_unlock_irq(&hpet_lock);
281 unlock_kernel();
278 282
279 hpet_timer_set_irq(devp); 283 hpet_timer_set_irq(devp);
280 284
@@ -682,6 +686,7 @@ static inline int hpet_tpcheck(struct hpet_task *tp)
682 return -ENXIO; 686 return -ENXIO;
683} 687}
684 688
689#if 0
685int hpet_unregister(struct hpet_task *tp) 690int hpet_unregister(struct hpet_task *tp)
686{ 691{
687 struct hpet_dev *devp; 692 struct hpet_dev *devp;
@@ -711,6 +716,7 @@ int hpet_unregister(struct hpet_task *tp)
711 716
712 return 0; 717 return 0;
713} 718}
719#endif /* 0 */
714 720
715static ctl_table hpet_table[] = { 721static ctl_table hpet_table[] = {
716 { 722 {