diff options
author | Alexander Stein <alexanders83@web.de> | 2016-04-29 14:50:03 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-05-02 13:53:07 +0200 |
commit | 7d3a3fe6488a62ff9aed27fc2128d35c1ba99c30 (patch) | |
tree | 2fe2c27389e372f2e87f44d8526d1f8302a45142 /drivers/pinctrl | |
parent | 234b6513fcb9d98adf71fcb6110be4e719632988 (diff) | |
download | blackbird-op-linux-7d3a3fe6488a62ff9aed27fc2128d35c1ba99c30.tar.gz blackbird-op-linux-7d3a3fe6488a62ff9aed27fc2128d35c1ba99c30.zip |
pinctrl: at91: Merge clk_prepare and clk_enable into clk_prepare_enable
This simplifies the normal as well as the error path.
Signed-off-by: Alexander Stein <alexanders83@web.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/pinctrl-at91.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c index 994292ff1b07..b7c0d6f7c046 100644 --- a/drivers/pinctrl/pinctrl-at91.c +++ b/drivers/pinctrl/pinctrl-at91.c @@ -1722,14 +1722,9 @@ static int at91_gpio_probe(struct platform_device *pdev) goto err; } - ret = clk_prepare(at91_chip->clock); - if (ret) - goto clk_prepare_err; - - /* enable PIO controller's clock */ - ret = clk_enable(at91_chip->clock); + ret = clk_prepare_enable(at91_chip->clock); if (ret) { - dev_err(&pdev->dev, "failed to enable clock, ignoring.\n"); + dev_err(&pdev->dev, "failed to prepare and enable clock, ignoring.\n"); goto clk_enable_err; } @@ -1789,10 +1784,8 @@ static int at91_gpio_probe(struct platform_device *pdev) irq_setup_err: gpiochip_remove(chip); gpiochip_add_err: - clk_disable(at91_chip->clock); clk_enable_err: - clk_unprepare(at91_chip->clock); -clk_prepare_err: + clk_disable_unprepare(at91_chip->clock); err: dev_err(&pdev->dev, "Failure %i for GPIO %i\n", ret, alias_idx); |