X-Git-Url: http://nv-tegra.nvidia.com/gitweb/?p=linux-2.6.git;a=blobdiff_plain;f=arch%2Fm68k%2Fmvme16x%2Frtc.c;h=432a9f13b2ed6bc6955908096740c1154e3d4ee5;hp=e341387787ab8b048e14ad9575fa96e889acc611;hb=e3e8e59dcd63621e3ade03083c17b6363a8e2dc8;hpb=f9c8154f367d471f1af56742fe8534f8458adb98 diff --git a/arch/m68k/mvme16x/rtc.c b/arch/m68k/mvme16x/rtc.c index e341387..432a9f1 100644 --- a/arch/m68k/mvme16x/rtc.c +++ b/arch/m68k/mvme16x/rtc.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -127,11 +128,14 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd, 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; }