diff mbox

[2/2] pinctrl: at91: replace clk_prepare + clk_enable by clk_prepare_enable

Message ID 1387132252-2584-3-git-send-email-b.brezillon@overkiz.com (mailing list archive)
State New, archived
Headers show

Commit Message

Boris BREZILLON Dec. 15, 2013, 6:30 p.m. UTC
Replace the clk_prepare and clk_enable calls by a single
clk_prepare_enable call.

Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
---
 drivers/pinctrl/pinctrl-at91.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Nicolas Ferre Dec. 16, 2013, 9:57 a.m. UTC | #1
On 15/12/2013 19:30, Boris BREZILLON :
> 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>

> ---
>  drivers/pinctrl/pinctrl-at91.c |    6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
> index 82f6301..4deb9cb 100644
> --- a/drivers/pinctrl/pinctrl-at91.c
> +++ b/drivers/pinctrl/pinctrl-at91.c
> @@ -1359,10 +1359,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);
>
Linus Walleij Dec. 16, 2013, 1:23 p.m. UTC | #2
On Sun, Dec 15, 2013 at 7:30 PM, Boris BREZILLON
<b.brezillon@overkiz.com> wrote:

> Replace the clk_prepare and clk_enable calls by a single
> clk_prepare_enable call.
>
> Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>

Patch applied with Nicolas' ACK.

Yours,
Linus Walleij
diff mbox

Patch

diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
index 82f6301..4deb9cb 100644
--- a/drivers/pinctrl/pinctrl-at91.c
+++ b/drivers/pinctrl/pinctrl-at91.c
@@ -1359,10 +1359,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);