X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=arch%2Fm68k%2Fbvme6000%2Frtc.c;h=e8ac3f7d72df6dd457aded95444e69655d16f7c1;hb=5b664cb235e97afbf34db9c4d77f08ebd725335e;hp=a812d03879f891b8e69501f13b2c410ae7241b01;hpb=58a3bb59973e33a428d72fa530a3d1d81feb0e8f;p=pandora-kernel.git diff --git a/arch/m68k/bvme6000/rtc.c b/arch/m68k/bvme6000/rtc.c index a812d03879f8..e8ac3f7d72df 100644 --- a/arch/m68k/bvme6000/rtc.c +++ b/arch/m68k/bvme6000/rtc.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -140,10 +141,14 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd, static int rtc_open(struct inode *inode, struct file *file) { - if(rtc_status) + lock_kernel(); + if(rtc_status) { + unlock_kernel(); return -EBUSY; + } rtc_status = 1; + unlock_kernel(); return 0; }