Skip to content

Commit

Permalink
clocksource: sh_mtu2: Convert timer lock to raw spinlock.
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Paul Mundt committed Jun 11, 2012
1 parent 7d0c399 commit 50393a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/clocksource/sh_mtu2.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ struct sh_mtu2_priv {
struct clock_event_device ced;
};

static DEFINE_SPINLOCK(sh_mtu2_lock);
static DEFINE_RAW_SPINLOCK(sh_mtu2_lock);

#define TSTR -1 /* shared register */
#define TCR 0 /* channel register */
Expand Down Expand Up @@ -107,7 +107,7 @@ static void sh_mtu2_start_stop_ch(struct sh_mtu2_priv *p, int start)
unsigned long flags, value;

/* start stop register shared by multiple timer channels */
spin_lock_irqsave(&sh_mtu2_lock, flags);
raw_spin_lock_irqsave(&sh_mtu2_lock, flags);
value = sh_mtu2_read(p, TSTR);

if (start)
Expand All @@ -116,7 +116,7 @@ static void sh_mtu2_start_stop_ch(struct sh_mtu2_priv *p, int start)
value &= ~(1 << cfg->timer_bit);

sh_mtu2_write(p, TSTR, value);
spin_unlock_irqrestore(&sh_mtu2_lock, flags);
raw_spin_unlock_irqrestore(&sh_mtu2_lock, flags);
}

static int sh_mtu2_enable(struct sh_mtu2_priv *p)
Expand Down

0 comments on commit 50393a9

Please sign in to comment.