diff --git a/[refs] b/[refs] index 66aff9b0b243..8cc94fd9ba6c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6b0ee363b294c3724224909dcb0b80f7dac3dfd6 +refs/heads/master: b0e54f7c477ad24fa0d49baed942c5a5909c748b diff --git a/trunk/drivers/char/ip27-rtc.c b/trunk/drivers/char/ip27-rtc.c index 86e6538a77b0..ec9d0443d92c 100644 --- a/trunk/drivers/char/ip27-rtc.c +++ b/trunk/drivers/char/ip27-rtc.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -163,15 +164,18 @@ static long rtc_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) static int rtc_open(struct inode *inode, struct file *file) { + lock_kernel(); spin_lock_irq(&rtc_lock); if (rtc_status & RTC_IS_OPEN) { spin_unlock_irq(&rtc_lock); + unlock_kernel(); return -EBUSY; } rtc_status |= RTC_IS_OPEN; spin_unlock_irq(&rtc_lock); + unlock_kernel(); return 0; }