aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/rtc/rtc-ds1553.c
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2008-10-15 22:03:04 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-16 11:21:40 -0700
commit743e6a504f81d1e2f086e726b69fb6631d11f820 (patch)
tree6fe23cd6708db3e95fcad00ef7af12253e97d063 /drivers/rtc/rtc-ds1553.c
parentrtc: rtc-rs5c372: add support for Ricoh R2025S/D RTC (diff)
downloadwireguard-linux-743e6a504f81d1e2f086e726b69fb6631d11f820.tar.xz
wireguard-linux-743e6a504f81d1e2f086e726b69fb6631d11f820.zip
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-ds1553.c')
-rw-r--r--drivers/rtc/rtc-ds1553.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/drivers/rtc/rtc-ds1553.c b/drivers/rtc/rtc-ds1553.c
index a19f11415540..4ef59285b489 100644
--- a/drivers/rtc/rtc-ds1553.c
+++ b/drivers/rtc/rtc-ds1553.c
@@ -207,17 +207,6 @@ static irqreturn_t ds1553_rtc_interrupt(int irq, void *dev_id)
return IRQ_HANDLED;
}
-static void ds1553_rtc_release(struct device *dev)
-{
- struct platform_device *pdev = to_platform_device(dev);
- struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
-
- if (pdata->irq >= 0) {
- pdata->irqen = 0;
- ds1553_rtc_update_alarm(pdata);
- }
-}
-
static int ds1553_rtc_ioctl(struct device *dev, unsigned int cmd,
unsigned long arg)
{
@@ -254,7 +243,6 @@ static const struct rtc_class_ops ds1553_rtc_ops = {
.set_time = ds1553_rtc_set_time,
.read_alarm = ds1553_rtc_read_alarm,
.set_alarm = ds1553_rtc_set_alarm,
- .release = ds1553_rtc_release,
.ioctl = ds1553_rtc_ioctl,
};