diff options
Diffstat (limited to 'drivers/rtc/rtc-dev.c')
-rw-r--r-- | drivers/rtc/rtc-dev.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/rtc/rtc-dev.c b/drivers/rtc/rtc-dev.c index 52e2743b04ec..ecdea44ae4e5 100644 --- a/drivers/rtc/rtc-dev.c +++ b/drivers/rtc/rtc-dev.c | |||
@@ -432,17 +432,20 @@ static int rtc_dev_release(struct inode *inode, struct file *file) | |||
432 | { | 432 | { |
433 | struct rtc_device *rtc = file->private_data; | 433 | struct rtc_device *rtc = file->private_data; |
434 | 434 | ||
435 | #ifdef CONFIG_RTC_INTF_DEV_UIE_EMUL | 435 | /* We shut down the repeating IRQs that userspace enabled, |
436 | clear_uie(rtc); | 436 | * since nothing is listening to them. |
437 | #endif | 437 | * - Update (UIE) ... currently only managed through ioctls |
438 | * - Periodic (PIE) ... also used through rtc_*() interface calls | ||
439 | * | ||
440 | * Leave the alarm alone; it may be set to trigger a system wakeup | ||
441 | * later, or be used by kernel code, and is a one-shot event anyway. | ||
442 | */ | ||
443 | rtc_dev_ioctl(file, RTC_UIE_OFF, 0); | ||
438 | rtc_irq_set_state(rtc, NULL, 0); | 444 | rtc_irq_set_state(rtc, NULL, 0); |
439 | 445 | ||
440 | if (rtc->ops->release) | 446 | if (rtc->ops->release) |
441 | rtc->ops->release(rtc->dev.parent); | 447 | rtc->ops->release(rtc->dev.parent); |
442 | 448 | ||
443 | if (file->f_flags & FASYNC) | ||
444 | rtc_dev_fasync(-1, file, 0); | ||
445 | |||
446 | clear_bit_unlock(RTC_DEV_BUSY, &rtc->flags); | 449 | clear_bit_unlock(RTC_DEV_BUSY, &rtc->flags); |
447 | return 0; | 450 | return 0; |
448 | } | 451 | } |