diff options
| -rw-r--r-- | drivers/rtc/rtc-sa1100.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/drivers/rtc/rtc-sa1100.c b/drivers/rtc/rtc-sa1100.c index cb9a585312cc..fef52c801a13 100644 --- a/drivers/rtc/rtc-sa1100.c +++ b/drivers/rtc/rtc-sa1100.c | |||
| @@ -42,19 +42,8 @@ | |||
| 42 | #define RTC_DEF_TRIM 0 | 42 | #define RTC_DEF_TRIM 0 |
| 43 | 43 | ||
| 44 | static const unsigned long RTC_FREQ = 1024; | 44 | static const unsigned long RTC_FREQ = 1024; |
| 45 | static struct rtc_time rtc_alarm; | ||
| 46 | static DEFINE_SPINLOCK(sa1100_rtc_lock); | 45 | static DEFINE_SPINLOCK(sa1100_rtc_lock); |
| 47 | 46 | ||
| 48 | static inline int rtc_periodic_alarm(struct rtc_time *tm) | ||
| 49 | { | ||
| 50 | return (tm->tm_year == -1) || | ||
| 51 | ((unsigned)tm->tm_mon >= 12) || | ||
| 52 | ((unsigned)(tm->tm_mday - 1) >= 31) || | ||
| 53 | ((unsigned)tm->tm_hour > 23) || | ||
| 54 | ((unsigned)tm->tm_min > 59) || | ||
| 55 | ((unsigned)tm->tm_sec > 59); | ||
| 56 | } | ||
| 57 | |||
| 58 | /* | 47 | /* |
| 59 | * Calculate the next alarm time given the requested alarm time mask | 48 | * Calculate the next alarm time given the requested alarm time mask |
| 60 | * and the current time. | 49 | * and the current time. |
| @@ -146,9 +135,6 @@ static irqreturn_t sa1100_rtc_interrupt(int irq, void *dev_id) | |||
| 146 | 135 | ||
| 147 | rtc_update_irq(rtc, 1, events); | 136 | rtc_update_irq(rtc, 1, events); |
| 148 | 137 | ||
| 149 | if (rtsr & RTSR_AL && rtc_periodic_alarm(&rtc_alarm)) | ||
| 150 | rtc_update_alarm(&rtc_alarm); | ||
| 151 | |||
| 152 | spin_unlock(&sa1100_rtc_lock); | 138 | spin_unlock(&sa1100_rtc_lock); |
| 153 | 139 | ||
| 154 | return IRQ_HANDLED; | 140 | return IRQ_HANDLED; |
| @@ -225,7 +211,6 @@ static int sa1100_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) | |||
| 225 | { | 211 | { |
| 226 | u32 rtsr; | 212 | u32 rtsr; |
| 227 | 213 | ||
| 228 | memcpy(&alrm->time, &rtc_alarm, sizeof(struct rtc_time)); | ||
| 229 | rtsr = RTSR; | 214 | rtsr = RTSR; |
| 230 | alrm->enabled = (rtsr & RTSR_ALE) ? 1 : 0; | 215 | alrm->enabled = (rtsr & RTSR_ALE) ? 1 : 0; |
| 231 | alrm->pending = (rtsr & RTSR_AL) ? 1 : 0; | 216 | alrm->pending = (rtsr & RTSR_AL) ? 1 : 0; |
