Skip to content

Commit

Permalink
pinctrl: at91: replace clk_prepare + clk_enable by clk_prepare_enable
Browse files Browse the repository at this point in the history
Replace the clk_prepare and clk_enable calls by a single
clk_prepare_enable 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>
  • Loading branch information
Boris BREZILLON authored and Linus Walleij committed Dec 16, 2013
1 parent 795f995 commit 37ef1d9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/pinctrl/pinctrl-at91.c
Original file line number Diff line number Diff line change
Expand Up @@ -1385,10 +1385,8 @@ void at91_pinctrl_gpio_resume(void)

pio = gpio_chips[i]->regbase;

if (!wakeups[i]) {
if (clk_prepare(gpio_chips[i]->clock) == 0)
clk_enable(gpio_chips[i]->clock);
}
if (!wakeups[i])
clk_prepare_enable(gpio_chips[i]->clock);

__raw_writel(wakeups[i], pio + PIO_IDR);
__raw_writel(backups[i], pio + PIO_IER);
Expand Down

0 comments on commit 37ef1d9

Please sign in to comment.