Re: [PATCH] pinctrl: plgpio: Call clk_disable_unprepare only if clk_prepare_enable is called
On Wed, Nov 14, 2012 at 9:37 AM, Axel Lin wrote: > This driver allows clk_get() failure, and still work without it. > This patch adds !IS_ERR(plgpio->clk) checking in plgpio_request() error path > so we only call clk_disable_unprepare() if clk_prepare_enable() is called. > > Signed-off-by: Axel Lin Applied with Viresh's ACK, thanks! Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] pinctrl: plgpio: Call clk_disable_unprepare only if clk_prepare_enable is called
On Wed, Nov 14, 2012 at 9:37 AM, Axel Lin axel@ingics.com wrote: This driver allows clk_get() failure, and still work without it. This patch adds !IS_ERR(plgpio-clk) checking in plgpio_request() error path so we only call clk_disable_unprepare() if clk_prepare_enable() is called. Signed-off-by: Axel Lin axel@ingics.com Applied with Viresh's ACK, thanks! Yours, Linus Walleij -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] pinctrl: plgpio: Call clk_disable_unprepare only if clk_prepare_enable is called
On 14 November 2012 14:07, Axel Lin wrote: > This driver allows clk_get() failure, and still work without it. > This patch adds !IS_ERR(plgpio->clk) checking in plgpio_request() error path > so we only call clk_disable_unprepare() if clk_prepare_enable() is called. > > Signed-off-by: Axel Lin Acked-by: Viresh Kumar -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] pinctrl: plgpio: Call clk_disable_unprepare only if clk_prepare_enable is called
This driver allows clk_get() failure, and still work without it. This patch adds !IS_ERR(plgpio->clk) checking in plgpio_request() error path so we only call clk_disable_unprepare() if clk_prepare_enable() is called. Signed-off-by: Axel Lin --- drivers/pinctrl/spear/pinctrl-plgpio.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/spear/pinctrl-plgpio.c b/drivers/pinctrl/spear/pinctrl-plgpio.c index 1044ad3..cf6d9c2 100644 --- a/drivers/pinctrl/spear/pinctrl-plgpio.c +++ b/drivers/pinctrl/spear/pinctrl-plgpio.c @@ -243,7 +243,8 @@ static int plgpio_request(struct gpio_chip *chip, unsigned offset) return 0; err1: - clk_disable_unprepare(plgpio->clk); + if (!IS_ERR(plgpio->clk)) + clk_disable_unprepare(plgpio->clk); err0: pinctrl_free_gpio(gpio); return ret; -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] pinctrl: plgpio: Call clk_disable_unprepare only if clk_prepare_enable is called
This driver allows clk_get() failure, and still work without it. This patch adds !IS_ERR(plgpio-clk) checking in plgpio_request() error path so we only call clk_disable_unprepare() if clk_prepare_enable() is called. Signed-off-by: Axel Lin axel@ingics.com --- drivers/pinctrl/spear/pinctrl-plgpio.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/spear/pinctrl-plgpio.c b/drivers/pinctrl/spear/pinctrl-plgpio.c index 1044ad3..cf6d9c2 100644 --- a/drivers/pinctrl/spear/pinctrl-plgpio.c +++ b/drivers/pinctrl/spear/pinctrl-plgpio.c @@ -243,7 +243,8 @@ static int plgpio_request(struct gpio_chip *chip, unsigned offset) return 0; err1: - clk_disable_unprepare(plgpio-clk); + if (!IS_ERR(plgpio-clk)) + clk_disable_unprepare(plgpio-clk); err0: pinctrl_free_gpio(gpio); return ret; -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] pinctrl: plgpio: Call clk_disable_unprepare only if clk_prepare_enable is called
On 14 November 2012 14:07, Axel Lin axel@ingics.com wrote: This driver allows clk_get() failure, and still work without it. This patch adds !IS_ERR(plgpio-clk) checking in plgpio_request() error path so we only call clk_disable_unprepare() if clk_prepare_enable() is called. Signed-off-by: Axel Lin axel@ingics.com Acked-by: Viresh Kumar viresh.ku...@linaro.org -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/