All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: sgtl5000: Use i2c_get_clientdata()
@ 2013-06-10 13:24 Fabio Estevam
  2013-06-10 13:24 ` [PATCH 2/2] Documentation: sgtl5000.txt: Add 'clocks' entry as a required propery Fabio Estevam
  2013-06-10 14:23 ` [PATCH 1/2] ASoC: sgtl5000: Use i2c_get_clientdata() Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Fabio Estevam @ 2013-06-10 13:24 UTC (permalink / raw)
  To: broonie; +Cc: Fabio Estevam, alsa-devel, shawn.guo

We should use i2c_get_clientdata() to get the codec private structure.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 sound/soc/codecs/sgtl5000.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index 2e0227b..d441559 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -1571,11 +1571,7 @@ disable_clk:
 
 static int sgtl5000_i2c_remove(struct i2c_client *client)
 {
-	struct sgtl5000_priv *sgtl5000;
-	sgtl5000 = devm_kzalloc(&client->dev, sizeof(struct sgtl5000_priv),
-								GFP_KERNEL);
-	if (!sgtl5000)
-		return -ENOMEM;
+	struct sgtl5000_priv *sgtl5000 = i2c_get_clientdata(client);
 
 	snd_soc_unregister_codec(&client->dev);
 	clk_disable_unprepare(sgtl5000->mclk);
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] Documentation: sgtl5000.txt: Add 'clocks' entry as a required propery
  2013-06-10 13:24 [PATCH 1/2] ASoC: sgtl5000: Use i2c_get_clientdata() Fabio Estevam
@ 2013-06-10 13:24 ` Fabio Estevam
  2013-06-10 14:23 ` [PATCH 1/2] ASoC: sgtl5000: Use i2c_get_clientdata() Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Fabio Estevam @ 2013-06-10 13:24 UTC (permalink / raw)
  To: broonie; +Cc: Fabio Estevam, alsa-devel, shawn.guo

Since commit 9e13f345 (ASoC: sgtl5000: Let the codec acquire its clock) , the 
'clocks' entry is mandatory, so update the binding doc.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 Documentation/devicetree/bindings/sound/sgtl5000.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/sgtl5000.txt b/Documentation/devicetree/bindings/sound/sgtl5000.txt
index 9cc4444..955df60 100644
--- a/Documentation/devicetree/bindings/sound/sgtl5000.txt
+++ b/Documentation/devicetree/bindings/sound/sgtl5000.txt
@@ -5,9 +5,12 @@ Required properties:
 
 - reg : the I2C address of the device
 
+- clocks : the clock provider of SYS_MCLK
+
 Example:
 
 codec: sgtl5000@0a {
 	compatible = "fsl,sgtl5000";
 	reg = <0x0a>;
+	clocks = <&clks 150>;
 };
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] ASoC: sgtl5000: Use i2c_get_clientdata()
  2013-06-10 13:24 [PATCH 1/2] ASoC: sgtl5000: Use i2c_get_clientdata() Fabio Estevam
  2013-06-10 13:24 ` [PATCH 2/2] Documentation: sgtl5000.txt: Add 'clocks' entry as a required propery Fabio Estevam
@ 2013-06-10 14:23 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2013-06-10 14:23 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: alsa-devel, shawn.guo


[-- Attachment #1.1: Type: text/plain, Size: 159 bytes --]

On Mon, Jun 10, 2013 at 10:24:41AM -0300, Fabio Estevam wrote:
> We should use i2c_get_clientdata() to get the codec private structure.

Applied both, thanks.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-06-10 14:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-10 13:24 [PATCH 1/2] ASoC: sgtl5000: Use i2c_get_clientdata() Fabio Estevam
2013-06-10 13:24 ` [PATCH 2/2] Documentation: sgtl5000.txt: Add 'clocks' entry as a required propery Fabio Estevam
2013-06-10 14:23 ` [PATCH 1/2] ASoC: sgtl5000: Use i2c_get_clientdata() Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.