pinctrl: sirf: fix spinlock deadlock in sirfsoc_gpio_set_input
authorBarry Song <Baohua.Song@csr.com>
Thu, 27 Sep 2012 09:55:17 +0000 (17:55 +0800)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 28 Sep 2012 07:27:35 +0000 (09:27 +0200)
sirfsoc_gpio_set_input() is called in those functions which have
held the spinlock, so delete the duplicated locking.

Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-sirf.c

index f309af2ced25f41851c1744d57a5ec18f4e2550e..0f4f833e3c933c3ac2b0eaa956aca1fab1ddbb56 100644 (file)
@@ -1458,15 +1458,10 @@ static void sirfsoc_gpio_handle_irq(unsigned int irq, struct irq_desc *desc)
 static inline void sirfsoc_gpio_set_input(struct sirfsoc_gpio_bank *bank, unsigned ctrl_offset)
 {
        u32 val;
-       unsigned long flags;
-
-       spin_lock_irqsave(&bank->lock, flags);
 
        val = readl(bank->chip.regs + ctrl_offset);
        val &= ~SIRFSOC_GPIO_CTL_OUT_EN_MASK;
        writel(val, bank->chip.regs + ctrl_offset);
-
-       spin_unlock_irqrestore(&bank->lock, flags);
 }
 
 static int sirfsoc_gpio_request(struct gpio_chip *chip, unsigned offset)