* [PATCH -next] i2c: digicolor: use clk_disable_unprepare instead of clk_unprepare
@ 2016-10-29 16:31 Wei Yongjun
2016-10-30 4:45 ` Baruch Siach
2016-11-18 0:48 ` [-next] " Wolfram Sang
0 siblings, 2 replies; 3+ messages in thread
From: Wei Yongjun @ 2016-10-29 16:31 UTC (permalink / raw)
To: Wolfram Sang, Baruch Siach; +Cc: Wei Yongjun, linux-i2c, linux-arm-kernel
From: Wei Yongjun <weiyongjun1@huawei.com>
since clk_prepare_enable() is used to get i2c->clk, we should
use clk_disable_unprepare() to release it for the error path.
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/i2c/busses/i2c-digicolor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-digicolor.c b/drivers/i2c/busses/i2c-digicolor.c
index 49f2084..50813a2 100644
--- a/drivers/i2c/busses/i2c-digicolor.c
+++ b/drivers/i2c/busses/i2c-digicolor.c
@@ -347,7 +347,7 @@ static int dc_i2c_probe(struct platform_device *pdev)
ret = i2c_add_adapter(&i2c->adap);
if (ret < 0) {
- clk_unprepare(i2c->clk);
+ clk_disable_unprepare(i2c->clk);
return ret;
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] i2c: digicolor: use clk_disable_unprepare instead of clk_unprepare
2016-10-29 16:31 [PATCH -next] i2c: digicolor: use clk_disable_unprepare instead of clk_unprepare Wei Yongjun
@ 2016-10-30 4:45 ` Baruch Siach
2016-11-18 0:48 ` [-next] " Wolfram Sang
1 sibling, 0 replies; 3+ messages in thread
From: Baruch Siach @ 2016-10-30 4:45 UTC (permalink / raw)
To: Wei Yongjun; +Cc: Wolfram Sang, Wei Yongjun, linux-i2c, linux-arm-kernel
Hi Wei Yongjun,
On Sat, Oct 29, 2016 at 04:31:17PM +0000, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> since clk_prepare_enable() is used to get i2c->clk, we should
> use clk_disable_unprepare() to release it for the error path.
>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Baruch Siach <baruch@tkos.co.il>
Thanks,
baruch
> drivers/i2c/busses/i2c-digicolor.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/busses/i2c-digicolor.c b/drivers/i2c/busses/i2c-digicolor.c
> index 49f2084..50813a2 100644
> --- a/drivers/i2c/busses/i2c-digicolor.c
> +++ b/drivers/i2c/busses/i2c-digicolor.c
> @@ -347,7 +347,7 @@ static int dc_i2c_probe(struct platform_device *pdev)
>
> ret = i2c_add_adapter(&i2c->adap);
> if (ret < 0) {
> - clk_unprepare(i2c->clk);
> + clk_disable_unprepare(i2c->clk);
> return ret;
> }
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [-next] i2c: digicolor: use clk_disable_unprepare instead of clk_unprepare
2016-10-29 16:31 [PATCH -next] i2c: digicolor: use clk_disable_unprepare instead of clk_unprepare Wei Yongjun
2016-10-30 4:45 ` Baruch Siach
@ 2016-11-18 0:48 ` Wolfram Sang
1 sibling, 0 replies; 3+ messages in thread
From: Wolfram Sang @ 2016-11-18 0:48 UTC (permalink / raw)
To: Wei Yongjun
Cc: Wolfram Sang, Baruch Siach, Wei Yongjun, linux-i2c,
linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 384 bytes --]
On Sat, Oct 29, 2016 at 04:31:17PM +0000, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> since clk_prepare_enable() is used to get i2c->clk, we should
> use clk_disable_unprepare() to release it for the error path.
>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> Acked-by: Baruch Siach <baruch@tkos.co.il>
Applied to for-current, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-11-18 0:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-29 16:31 [PATCH -next] i2c: digicolor: use clk_disable_unprepare instead of clk_unprepare Wei Yongjun
2016-10-30 4:45 ` Baruch Siach
2016-11-18 0:48 ` [-next] " Wolfram Sang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).