Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c984c87826a6e3b2adae1fab8d5bddcf26af8c78
Commit:     c984c87826a6e3b2adae1fab8d5bddcf26af8c78
Parent:     2c771a4c28a71b6acc0bd6b7ef56e0a1849c9b09
Author:     Yoichi Yuasa <[EMAIL PROTECTED]>
AuthorDate: Tue Oct 23 18:19:13 2007 +0900
Committer:  Ralf Baechle <[EMAIL PROTECTED]>
CommitDate: Mon Oct 29 19:35:33 2007 +0000

    [MIPS] time: Use non-interrupt locks in GT641xx clockevent driver
    
    set_next_event() and set_mode() are always called with interrupt disabled.
    irqsave and irqrestore are not necessary for spinlock.
    Pointed out by Atsushi Nemoto.
    
    Signed-off-by: Yoichi Yuasa <[EMAIL PROTECTED]>
    Signed-off-by: Ralf Baechle <[EMAIL PROTECTED]>
---
 arch/mips/kernel/cevt-gt641xx.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/arch/mips/kernel/cevt-gt641xx.c b/arch/mips/kernel/cevt-gt641xx.c
index 4c651b2..155ef81 100644
--- a/arch/mips/kernel/cevt-gt641xx.c
+++ b/arch/mips/kernel/cevt-gt641xx.c
@@ -49,10 +49,9 @@ int gt641xx_timer0_state(void)
 static int gt641xx_timer0_set_next_event(unsigned long delta,
                                         struct clock_event_device *evt)
 {
-       unsigned long flags;
        u32 ctrl;
 
-       spin_lock_irqsave(&gt641xx_timer_lock, flags);
+       spin_lock(&gt641xx_timer_lock);
 
        ctrl = GT_READ(GT_TC_CONTROL_OFS);
        ctrl &= ~(GT_TC_CONTROL_ENTC0_MSK | GT_TC_CONTROL_SELTC0_MSK);
@@ -61,7 +60,7 @@ static int gt641xx_timer0_set_next_event(unsigned long delta,
        GT_WRITE(GT_TC0_OFS, delta);
        GT_WRITE(GT_TC_CONTROL_OFS, ctrl);
 
-       spin_unlock_irqrestore(&gt641xx_timer_lock, flags);
+       spin_unlock(&gt641xx_timer_lock);
 
        return 0;
 }
@@ -69,10 +68,9 @@ static int gt641xx_timer0_set_next_event(unsigned long delta,
 static void gt641xx_timer0_set_mode(enum clock_event_mode mode,
                                    struct clock_event_device *evt)
 {
-       unsigned long flags;
        u32 ctrl;
 
-       spin_lock_irqsave(&gt641xx_timer_lock, flags);
+       spin_lock(&gt641xx_timer_lock);
 
        ctrl = GT_READ(GT_TC_CONTROL_OFS);
        ctrl &= ~(GT_TC_CONTROL_ENTC0_MSK | GT_TC_CONTROL_SELTC0_MSK);
@@ -90,7 +88,7 @@ static void gt641xx_timer0_set_mode(enum clock_event_mode 
mode,
 
        GT_WRITE(GT_TC_CONTROL_OFS, ctrl);
 
-       spin_unlock_irqrestore(&gt641xx_timer_lock, flags);
+       spin_unlock(&gt641xx_timer_lock);
 }
 
 static void gt641xx_timer0_event_handler(struct clock_event_device *dev)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to