summaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-sh.c
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2008-10-16 09:03:04 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-16 22:21:40 +0400
commit743e6a504f81d1e2f086e726b69fb6631d11f820 (patch)
tree6fe23cd6708db3e95fcad00ef7af12253e97d063 /drivers/rtc/rtc-sh.c
parent37fc5e2c42833c32f7c8eb5d9b3a3115bb37d9c3 (diff)
downloadlinux-743e6a504f81d1e2f086e726b69fb6631d11f820.tar.xz
rtc: file close() consistently disables repeating irqs
Make the rtc framework consistent about disabling 1/second update IRQs that may have been activated through the /dev interface, when that /dev file is closed. (It may have closed because of coredump, etc.) This was previously done only for emulated update IRQs ... now, do it always. Also comment the current policy: repeating IRQs (periodic, update) that userspace enabled will be cleanly disabled, but alarms are left alone. Such repeating IRQs are a constant and pointless system load. Update some RTC drivers to remove now-needless release() methods. Most such methods just enforce that policy. The others all seem to be buggy, and mistreat in-kernel clients of periodic or alarm IRQs. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Andrew Sharp <andy.sharp@onstor.com> Cc: Angelo Castello <angelo.castello@st.com> Acked-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Acked-by: Paul Mundt <lethal@linux-sh.org> Cc: Thomas Hommel <thomas.hommel@gefanuc.com> Acked-by: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc/rtc-sh.c')
-rw-r--r--drivers/rtc/rtc-sh.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/rtc/rtc-sh.c b/drivers/rtc/rtc-sh.c
index 1f88e9e914ec..fcead4c4cd1f 100644
--- a/drivers/rtc/rtc-sh.c
+++ b/drivers/rtc/rtc-sh.c
@@ -257,12 +257,6 @@ static inline void sh_rtc_setaie(struct device *dev, unsigned int enable)
spin_unlock_irq(&rtc->lock);
}
-static void sh_rtc_release(struct device *dev)
-{
- sh_rtc_setpie(dev, 0);
- sh_rtc_setaie(dev, 0);
-}
-
static int sh_rtc_proc(struct device *dev, struct seq_file *seq)
{
struct sh_rtc *rtc = dev_get_drvdata(dev);
@@ -559,7 +553,6 @@ static int sh_rtc_irq_set_freq(struct device *dev, int freq)
}
static struct rtc_class_ops sh_rtc_ops = {
- .release = sh_rtc_release,
.ioctl = sh_rtc_ioctl,
.read_time = sh_rtc_read_time,
.set_time = sh_rtc_set_time,