pinctrl: at91: fix clk_unprepare and clk_disable order
authorBoris BREZILLON <b.brezillon@overkiz.com>
Sun, 15 Dec 2013 18:30:51 +0000 (19:30 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 16 Dec 2013 13:21:43 +0000 (14:21 +0100)
clk_unprepare shall be called before clk_disable.
Fix the issue by replacing the clk_unprepare and clk_disable calls by a
single clk_disable_unprepare call.

Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-at91.c

index bcfc8a2eebca7c99da31a8dda527c6f88a035a33..f91c72f878ad4879d6645feae4e1666cc5d4a578 100644 (file)
@@ -1365,13 +1365,11 @@ void at91_pinctrl_gpio_suspend(void)
                __raw_writel(backups[i], pio + PIO_IDR);
                __raw_writel(wakeups[i], pio + PIO_IER);
 
-               if (!wakeups[i]) {
-                       clk_unprepare(gpio_chips[i]->clock);
-                       clk_disable(gpio_chips[i]->clock);
-               } else {
+               if (!wakeups[i])
+                       clk_disable_unprepare(gpio_chips[i]->clock);
+               else
                        printk(KERN_DEBUG "GPIO-%c may wake for %08x\n",
                               'A'+i, wakeups[i]);
-               }
        }
 }