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=15c16b62dff5cf604c029ff34f59fbe281f07476;hpb=63e8d9114dab88c101be2372cb1f83a4fe74d9c1;p=pandora-kernel.git diff --git a/arch/m68k/bvme6000/rtc.c b/arch/m68k/bvme6000/rtc.c index 15c16b62dff5..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; } @@ -159,7 +164,7 @@ static int rtc_release(struct inode *inode, struct file *file) * The various file operations we support. */ -static struct file_operations rtc_fops = { +static const struct file_operations rtc_fops = { .ioctl = rtc_ioctl, .open = rtc_open, .release = rtc_release,