aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-mxc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rtc/rtc-mxc.c')
-rw-r--r--drivers/rtc/rtc-mxc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-mxc.c b/drivers/rtc/rtc-mxc.c
index 5e1d64ee5228..e3e50d69baf8 100644
--- a/drivers/rtc/rtc-mxc.c
+++ b/drivers/rtc/rtc-mxc.c
@@ -202,10 +202,11 @@ static irqreturn_t mxc_rtc_interrupt(int irq, void *dev_id)
202 struct platform_device *pdev = dev_id; 202 struct platform_device *pdev = dev_id;
203 struct rtc_plat_data *pdata = platform_get_drvdata(pdev); 203 struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
204 void __iomem *ioaddr = pdata->ioaddr; 204 void __iomem *ioaddr = pdata->ioaddr;
205 unsigned long flags;
205 u32 status; 206 u32 status;
206 u32 events = 0; 207 u32 events = 0;
207 208
208 spin_lock_irq(&pdata->rtc->irq_lock); 209 spin_lock_irqsave(&pdata->rtc->irq_lock, flags);
209 status = readw(ioaddr + RTC_RTCISR) & readw(ioaddr + RTC_RTCIENR); 210 status = readw(ioaddr + RTC_RTCISR) & readw(ioaddr + RTC_RTCIENR);
210 /* clear interrupt sources */ 211 /* clear interrupt sources */
211 writew(status, ioaddr + RTC_RTCISR); 212 writew(status, ioaddr + RTC_RTCISR);
@@ -224,7 +225,7 @@ static irqreturn_t mxc_rtc_interrupt(int irq, void *dev_id)
224 events |= (RTC_PF | RTC_IRQF); 225 events |= (RTC_PF | RTC_IRQF);
225 226
226 rtc_update_irq(pdata->rtc, 1, events); 227 rtc_update_irq(pdata->rtc, 1, events);
227 spin_unlock_irq(&pdata->rtc->irq_lock); 228 spin_unlock_irqrestore(&pdata->rtc->irq_lock, flags);
228 229
229 return IRQ_HANDLED; 230 return IRQ_HANDLED;
230} 231}