diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-22 10:49:54 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-22 10:49:54 -0700 |
commit | c37927d4359e81b85de644f8fb08878717cf5f3f (patch) | |
tree | 25dabf2d905e1410819d1bdaba0bf5f779100d3c /drivers/char/mmtimer.c | |
parent | 5704e44d283e907623e3775c1262f206a2c48cf3 (diff) | |
parent | 2a48fc0ab24241755dc93bfd4f01d68efab47f5a (diff) | |
download | linux-c37927d4359e81b85de644f8fb08878717cf5f3f.tar.gz linux-c37927d4359e81b85de644f8fb08878717cf5f3f.tar.bz2 linux-c37927d4359e81b85de644f8fb08878717cf5f3f.zip |
Merge branch 'trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl
* 'trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl:
block: autoconvert trivial BKL users to private mutex
drivers: autoconvert trivial BKL users to private mutex
ipmi: autoconvert trivial BKL users to private mutex
mac: autoconvert trivial BKL users to private mutex
mtd: autoconvert trivial BKL users to private mutex
scsi: autoconvert trivial BKL users to private mutex
Fix up trivial conflicts (due to addition of private mutex right next to
deletion of a version string) in drivers/char/pcmcia/cm40[04]0_cs.c
Diffstat (limited to 'drivers/char/mmtimer.c')
-rw-r--r-- | drivers/char/mmtimer.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/char/mmtimer.c b/drivers/char/mmtimer.c index ea7c99fa978f..fe4697844ec1 100644 --- a/drivers/char/mmtimer.c +++ b/drivers/char/mmtimer.c @@ -32,7 +32,7 @@ #include <linux/interrupt.h> #include <linux/time.h> #include <linux/math64.h> -#include <linux/smp_lock.h> +#include <linux/mutex.h> #include <linux/slab.h> #include <asm/uaccess.h> @@ -59,6 +59,7 @@ extern unsigned long sn_rtc_cycles_per_second; #define rtc_time() (*RTC_COUNTER_ADDR) +static DEFINE_MUTEX(mmtimer_mutex); static long mmtimer_ioctl(struct file *file, unsigned int cmd, unsigned long arg); static int mmtimer_mmap(struct file *file, struct vm_area_struct *vma); @@ -371,7 +372,7 @@ static long mmtimer_ioctl(struct file *file, unsigned int cmd, { int ret = 0; - lock_kernel(); + mutex_lock(&mmtimer_mutex); switch (cmd) { case MMTIMER_GETOFFSET: /* offset of the counter */ @@ -414,7 +415,7 @@ static long mmtimer_ioctl(struct file *file, unsigned int cmd, ret = -ENOTTY; break; } - unlock_kernel(); + mutex_unlock(&mmtimer_mutex); return ret; } |