From: Thomas Gleixner Date: Sun, 16 Sep 2007 13:36:43 +0000 (+0200) Subject: timekeeping: access rtc outside of xtime lock X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3be9095063885d482b87d3875ea7f28e635882d0;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git timekeeping: access rtc outside of xtime lock Lockdep complains about the access of rtc in timekeeping_suspend inside the interrupt disabled region of the write locked xtime lock. Move the access outside. Signed-off-by: Thomas Gleixner Cc: John Stultz --- diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index acc417b5a9b7..f682091fa890 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -325,9 +325,10 @@ static int timekeeping_suspend(struct sys_device *dev, pm_message_t state) { unsigned long flags; + timekeeping_suspend_time = read_persistent_clock(); + write_seqlock_irqsave(&xtime_lock, flags); timekeeping_suspended = 1; - timekeeping_suspend_time = read_persistent_clock(); write_sequnlock_irqrestore(&xtime_lock, flags); clockevents_notify(CLOCK_EVT_NOTIFY_SUSPEND, NULL);