aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/mvme16x/rtc.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-05-17 13:54:29 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-17 13:54:29 -0700
commitba2e1c5f25a99dec3873745031ad23ce3fd79bff (patch)
treeebcc8e9b0f395033e8ba1db8e30fb6ea78edc442 /arch/m68k/mvme16x/rtc.c
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/joern/logfs (diff)
parentm68k: amiga - Floppy platform device conversion (diff)
downloadlinux-dev-ba2e1c5f25a99dec3873745031ad23ce3fd79bff.tar.xz
linux-dev-ba2e1c5f25a99dec3873745031ad23ce3fd79bff.zip
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k: amiga - Floppy platform device conversion m68k: amiga - Sound platform device conversion m68k: amiga - Frame buffer platform device conversion m68k: amiga - Zorro host bridge platform device conversion m68k: amiga - Zorro bus modalias support platform: Make platform resource input parameters const m68k: invoke oom-killer from page fault serial167: Kill unused variables m68k: Implement generic_find_next_{zero_,}le_bit() m68k: hp300 - Checkpatch cleanup m68k: Remove trailing spaces in messages m68k: Simplify param.h by using <asm-generic/param.h> m68k: Remove BKL from rtc implementations
Diffstat (limited to 'arch/m68k/mvme16x/rtc.c')
-rw-r--r--arch/m68k/mvme16x/rtc.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/arch/m68k/mvme16x/rtc.c b/arch/m68k/mvme16x/rtc.c
index 8da9c250d3e1..11ac6f63967a 100644
--- a/arch/m68k/mvme16x/rtc.c
+++ b/arch/m68k/mvme16x/rtc.c
@@ -9,7 +9,6 @@
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/miscdevice.h>
-#include <linux/smp_lock.h>
#include <linux/ioport.h>
#include <linux/capability.h>
#include <linux/fcntl.h>
@@ -36,8 +35,7 @@ static const unsigned char days_in_mo[] =
static atomic_t rtc_ready = ATOMIC_INIT(1);
-static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
- unsigned long arg)
+static long rtc_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
volatile MK48T08ptr_t rtc = (MK48T08ptr_t)MVME_RTC_BASE;
unsigned long flags;
@@ -120,22 +118,15 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
}
/*
- * We enforce only one user at a time here with the open/close.
- * Also clear the previous interrupt data on an open, and clean
- * up things on a close.
+ * We enforce only one user at a time here with the open/close.
*/
-
static int rtc_open(struct inode *inode, struct file *file)
{
- lock_kernel();
if( !atomic_dec_and_test(&rtc_ready) )
{
atomic_inc( &rtc_ready );
- unlock_kernel();
return -EBUSY;
}
- unlock_kernel();
-
return 0;
}
@@ -150,9 +141,9 @@ static int rtc_release(struct inode *inode, struct file *file)
*/
static const struct file_operations rtc_fops = {
- .ioctl = rtc_ioctl,
- .open = rtc_open,
- .release = rtc_release,
+ .unlocked_ioctl = rtc_ioctl,
+ .open = rtc_open,
+ .release = rtc_release,
};
static struct miscdevice rtc_dev=