summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinctrl-at91.c
diff options
context:
space:
mode:
authorBoris BREZILLON <b.brezillon@overkiz.com>2013-12-15 19:30:51 +0100
committerLinus Walleij <linus.walleij@linaro.org>2013-12-16 14:21:43 +0100
commit795f9953eaccf9e343cad9aecbf8956046090d76 (patch)
treec6fbb37934a75f0c67a303206a4bdbd69b7dfec4 /drivers/pinctrl/pinctrl-at91.c
parentpinctrl: Adds slew-rate, input-enable/disable (diff)
downloadlinux-795f9953eaccf9e343cad9aecbf8956046090d76.tar.xz
linux-795f9953eaccf9e343cad9aecbf8956046090d76.zip
pinctrl: at91: fix clk_unprepare and clk_disable order
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>
Diffstat (limited to '')
-rw-r--r--drivers/pinctrl/pinctrl-at91.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
index bcfc8a2eebca..f91c72f878ad 100644
--- a/drivers/pinctrl/pinctrl-at91.c
+++ b/drivers/pinctrl/pinctrl-at91.c
@@ -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]);
- }
}
}