From 676b29c4bc9ad3b6f4d2e767896ec73c6b84c334 Mon Sep 17 00:00:00 2001 From: Atsushi Nemoto Date: Thu, 10 Jul 2008 01:02:08 +0900 Subject: [PATCH] --- yaml --- r: 101451 b: refs/heads/master c: 14476007c90005c8992b786c15a59cca31f53268 h: refs/heads/master i: 101449: add945228abaa88b2fbe136e709a43137229da66 101447: ed9958453b57d3d98bd4db5e297c244c74a8221f v: v3 --- [refs] | 2 +- trunk/arch/mips/kernel/gpio_txx9.c | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index dc639110551d..7be888830071 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 315806cb19f9d375dccbc2d60fa14e16afdcd5ac +refs/heads/master: 14476007c90005c8992b786c15a59cca31f53268 diff --git a/trunk/arch/mips/kernel/gpio_txx9.c b/trunk/arch/mips/kernel/gpio_txx9.c index b1436a857998..c6854d9df926 100644 --- a/trunk/arch/mips/kernel/gpio_txx9.c +++ b/trunk/arch/mips/kernel/gpio_txx9.c @@ -47,23 +47,25 @@ static void txx9_gpio_set(struct gpio_chip *chip, unsigned int offset, static int txx9_gpio_dir_in(struct gpio_chip *chip, unsigned int offset) { - spin_lock_irq(&txx9_gpio_lock); + unsigned long flags; + spin_lock_irqsave(&txx9_gpio_lock, flags); __raw_writel(__raw_readl(&txx9_pioptr->dir) & ~(1 << offset), &txx9_pioptr->dir); mmiowb(); - spin_unlock_irq(&txx9_gpio_lock); + spin_unlock_irqrestore(&txx9_gpio_lock, flags); return 0; } static int txx9_gpio_dir_out(struct gpio_chip *chip, unsigned int offset, int value) { - spin_lock_irq(&txx9_gpio_lock); + unsigned long flags; + spin_lock_irqsave(&txx9_gpio_lock, flags); txx9_gpio_set_raw(offset, value); __raw_writel(__raw_readl(&txx9_pioptr->dir) | (1 << offset), &txx9_pioptr->dir); mmiowb(); - spin_unlock_irq(&txx9_gpio_lock); + spin_unlock_irqrestore(&txx9_gpio_lock, flags); return 0; }