diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-22 13:49:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-22 13:49:54 -0400 |
commit | c37927d4359e81b85de644f8fb08878717cf5f3f (patch) | |
tree | 25dabf2d905e1410819d1bdaba0bf5f779100d3c /drivers/char/mmtimer.c | |
parent | 5704e44d283e907623e3775c1262f206a2c48cf3 (diff) | |
parent | 2a48fc0ab24241755dc93bfd4f01d68efab47f5a (diff) |
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 @@ | |||
32 | #include <linux/interrupt.h> | 32 | #include <linux/interrupt.h> |
33 | #include <linux/time.h> | 33 | #include <linux/time.h> |
34 | #include <linux/math64.h> | 34 | #include <linux/math64.h> |
35 | #include <linux/smp_lock.h> | 35 | #include <linux/mutex.h> |
36 | #include <linux/slab.h> | 36 | #include <linux/slab.h> |
37 | 37 | ||
38 | #include <asm/uaccess.h> | 38 | #include <asm/uaccess.h> |
@@ -59,6 +59,7 @@ extern unsigned long sn_rtc_cycles_per_second; | |||
59 | 59 | ||
60 | #define rtc_time() (*RTC_COUNTER_ADDR) | 60 | #define rtc_time() (*RTC_COUNTER_ADDR) |
61 | 61 | ||
62 | static DEFINE_MUTEX(mmtimer_mutex); | ||
62 | static long mmtimer_ioctl(struct file *file, unsigned int cmd, | 63 | static long mmtimer_ioctl(struct file *file, unsigned int cmd, |
63 | unsigned long arg); | 64 | unsigned long arg); |
64 | static int mmtimer_mmap(struct file *file, struct vm_area_struct *vma); | 65 | 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, | |||
371 | { | 372 | { |
372 | int ret = 0; | 373 | int ret = 0; |
373 | 374 | ||
374 | lock_kernel(); | 375 | mutex_lock(&mmtimer_mutex); |
375 | 376 | ||
376 | switch (cmd) { | 377 | switch (cmd) { |
377 | case MMTIMER_GETOFFSET: /* offset of the counter */ | 378 | case MMTIMER_GETOFFSET: /* offset of the counter */ |
@@ -414,7 +415,7 @@ static long mmtimer_ioctl(struct file *file, unsigned int cmd, | |||
414 | ret = -ENOTTY; | 415 | ret = -ENOTTY; |
415 | break; | 416 | break; |
416 | } | 417 | } |
417 | unlock_kernel(); | 418 | mutex_unlock(&mmtimer_mutex); |
418 | return ret; | 419 | return ret; |
419 | } | 420 | } |
420 | 421 | ||