From e6229bec25be4ba00f31dd26e25721cc96c22262 Mon Sep 17 00:00:00 2001 From: Atsushi Nemoto Date: Thu, 18 Jun 2009 16:49:09 -0700 Subject: rtc: make rtc_update_irq callable with irqs enabled The rtc_update_irq() might be called with irqs enabled, if a interrupt handler was registered without IRQF_DISABLED. Use spin_lock_irqsave/spin_unlock_irqrestore instead of spin_lock/spin_unlock. Also update kerneldoc and drivers which do extra work to follow the current interface spec, as suggestted by David Brownell. Signed-off-by: Atsushi Nemoto Cc: Alessandro Zummo Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/rtc/rtc-test.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers/rtc/rtc-test.c') diff --git a/drivers/rtc/rtc-test.c b/drivers/rtc/rtc-test.c index e478280ff628..51725f7755b0 100644 --- a/drivers/rtc/rtc-test.c +++ b/drivers/rtc/rtc-test.c @@ -93,7 +93,6 @@ static ssize_t test_irq_store(struct device *dev, struct rtc_device *rtc = platform_get_drvdata(plat_dev); retval = count; - local_irq_disable(); if (strncmp(buf, "tick", 4) == 0) rtc_update_irq(rtc, 1, RTC_PF | RTC_IRQF); else if (strncmp(buf, "alarm", 5) == 0) @@ -102,7 +101,6 @@ static ssize_t test_irq_store(struct device *dev, rtc_update_irq(rtc, 1, RTC_UF | RTC_IRQF); else retval = -EINVAL; - local_irq_enable(); return retval; } -- cgit