[RFT,v2,2/3] ASoC: samsung: Add missing prepare for iis clock of s3c24xx
diff mbox

Message ID 20170727171338.13300-3-krzk@kernel.org
State Accepted
Commit 81ea6cc73c384e4093519e0c75394aa2a1941a10
Headers show

Commit Message

Krzysztof Kozlowski July 27, 2017, 5:13 p.m. UTC
The s3c_i2sv2_probe() only enabled iis clock.  Missing prepare isn't
probably fatal, because for SoC clocks this is usually no-op, but for
correctness this clock should be prepared.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

---

Changes since v1:
1. New patch
---
 sound/soc/samsung/s3c-i2s-v2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Arvind Yadav July 28, 2017, 4:41 a.m. UTC | #1
Hi,


On Thursday 27 July 2017 10:43 PM, Krzysztof Kozlowski wrote:
> The s3c_i2sv2_probe() only enabled iis clock.  Missing prepare isn't
> probably fatal, because for SoC clocks this is usually no-op, but for
> correctness this clock should be prepared.
>
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
>
> ---
>
> Changes since v1:
> 1. New patch
> ---
>   sound/soc/samsung/s3c-i2s-v2.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/soc/samsung/s3c-i2s-v2.c b/sound/soc/samsung/s3c-i2s-v2.c
> index 9b28046eea8e..3894bda06ebb 100644
> --- a/sound/soc/samsung/s3c-i2s-v2.c
> +++ b/sound/soc/samsung/s3c-i2s-v2.c
> @@ -637,7 +637,7 @@ int s3c_i2sv2_probe(struct snd_soc_dai *dai,
>   		return -ENOENT;
>   	}
>   
> -	clk_enable(i2s->iis_pclk);
> +	clk_prepare_enable(i2s->iis_pclk);
Please, handle are return value of clk_prepare_enble.
>   
>   	/* Mark ourselves as in TXRX mode so we can run through our cleanup
>   	 * process without warnings. */
~arvind
Krzysztof Kozlowski July 28, 2017, 5:44 a.m. UTC | #2
On Fri, Jul 28, 2017 at 10:11:48AM +0530, Arvind Yadav wrote:
> Hi,
> 
> 
> On Thursday 27 July 2017 10:43 PM, Krzysztof Kozlowski wrote:
> >The s3c_i2sv2_probe() only enabled iis clock.  Missing prepare isn't
> >probably fatal, because for SoC clocks this is usually no-op, but for
> >correctness this clock should be prepared.
> >
> >Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> >
> >---
> >
> >Changes since v1:
> >1. New patch
> >---
> >  sound/soc/samsung/s3c-i2s-v2.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/sound/soc/samsung/s3c-i2s-v2.c b/sound/soc/samsung/s3c-i2s-v2.c
> >index 9b28046eea8e..3894bda06ebb 100644
> >--- a/sound/soc/samsung/s3c-i2s-v2.c
> >+++ b/sound/soc/samsung/s3c-i2s-v2.c
> >@@ -637,7 +637,7 @@ int s3c_i2sv2_probe(struct snd_soc_dai *dai,
> >  		return -ENOENT;
> >  	}
> >-	clk_enable(i2s->iis_pclk);
> >+	clk_prepare_enable(i2s->iis_pclk);
> Please, handle are return value of clk_prepare_enble.

Which is a different issue, different bug. We can fix it but it should
be not mixed with this fix here.

Best regards,
Krzysztof
Arvind Yadav July 28, 2017, 6:05 a.m. UTC | #3
On Friday 28 July 2017 11:14 AM, Krzysztof Kozlowski wrote:
> On Fri, Jul 28, 2017 at 10:11:48AM +0530, Arvind Yadav wrote:
>> Hi,
>>
>>
>> On Thursday 27 July 2017 10:43 PM, Krzysztof Kozlowski wrote:
>>> The s3c_i2sv2_probe() only enabled iis clock.  Missing prepare isn't
>>> probably fatal, because for SoC clocks this is usually no-op, but for
>>> correctness this clock should be prepared.
>>>
>>> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Arvind Yadav<arvind.yadav.cs@gmail.com 
<mailto:arvind.yadav.cs@gmail.com>>
>>>
>>> ---
>>>
>>> Changes since v1:
>>> 1. New patch
>>> ---
>>>   sound/soc/samsung/s3c-i2s-v2.c | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/sound/soc/samsung/s3c-i2s-v2.c b/sound/soc/samsung/s3c-i2s-v2.c
>>> index 9b28046eea8e..3894bda06ebb 100644
>>> --- a/sound/soc/samsung/s3c-i2s-v2.c
>>> +++ b/sound/soc/samsung/s3c-i2s-v2.c
>>> @@ -637,7 +637,7 @@ int s3c_i2sv2_probe(struct snd_soc_dai *dai,
>>>   		return -ENOENT;
>>>   	}
>>> -	clk_enable(i2s->iis_pclk);
>>> +	clk_prepare_enable(i2s->iis_pclk);
>> Please, handle are return value of clk_prepare_enble.
> Which is a different issue, different bug. We can fix it but it should
> be not mixed with this fix here.
>
> Best regards,
> Krzysztof
>

Patch
diff mbox

diff --git a/sound/soc/samsung/s3c-i2s-v2.c b/sound/soc/samsung/s3c-i2s-v2.c
index 9b28046eea8e..3894bda06ebb 100644
--- a/sound/soc/samsung/s3c-i2s-v2.c
+++ b/sound/soc/samsung/s3c-i2s-v2.c
@@ -637,7 +637,7 @@  int s3c_i2sv2_probe(struct snd_soc_dai *dai,
 		return -ENOENT;
 	}
 
-	clk_enable(i2s->iis_pclk);
+	clk_prepare_enable(i2s->iis_pclk);
 
 	/* Mark ourselves as in TXRX mode so we can run through our cleanup
 	 * process without warnings. */