alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: sam9g20_wm8731: drop machine_is_xxx
@ 2015-01-06 11:14 Alexandre Belloni
  2015-01-06 12:00 ` Mark Brown
  2015-01-06 17:45 ` Mark Brown
  0 siblings, 2 replies; 9+ messages in thread
From: Alexandre Belloni @ 2015-01-06 11:14 UTC (permalink / raw)
  To: Mark Brown, Bo Shen
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, alsa-devel,
	linux-arm-kernel, linux-kernel, Nicolas Ferre, Alexandre Belloni

Atmel based boards can now only be used with device tree. Drop non DT
initialization.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 sound/soc/atmel/sam9g20_wm8731.c | 68 ++++++++++++++++++----------------------
 1 file changed, 31 insertions(+), 37 deletions(-)

diff --git a/sound/soc/atmel/sam9g20_wm8731.c b/sound/soc/atmel/sam9g20_wm8731.c
index 531728975bbb..639a85d0999c 100644
--- a/sound/soc/atmel/sam9g20_wm8731.c
+++ b/sound/soc/atmel/sam9g20_wm8731.c
@@ -46,8 +46,6 @@
 #include <sound/pcm_params.h>
 #include <sound/soc.h>
 
-#include <asm/mach-types.h>
-
 #include "../codecs/wm8731.h"
 #include "atmel-pcm.h"
 #include "atmel_ssc_dai.h"
@@ -197,9 +195,7 @@ static int at91sam9g20ek_audio_probe(struct platform_device *pdev)
 	int ret;
 
 	if (!np) {
-		if (!(machine_is_at91sam9g20ek() ||
-			machine_is_at91sam9g20ek_2mmc()))
-			return -ENODEV;
+		return -ENODEV;
 	}
 
 	ret = atmel_ssc_set_audio(0);
@@ -236,39 +232,37 @@ static int at91sam9g20ek_audio_probe(struct platform_device *pdev)
 	card->dev = &pdev->dev;
 
 	/* Parse device node info */
-	if (np) {
-		ret = snd_soc_of_parse_card_name(card, "atmel,model");
-		if (ret)
-			goto err;
-
-		ret = snd_soc_of_parse_audio_routing(card,
-			"atmel,audio-routing");
-		if (ret)
-			goto err;
-
-		/* Parse codec info */
-		at91sam9g20ek_dai.codec_name = NULL;
-		codec_np = of_parse_phandle(np, "atmel,audio-codec", 0);
-		if (!codec_np) {
-			dev_err(&pdev->dev, "codec info missing\n");
-			return -EINVAL;
-		}
-		at91sam9g20ek_dai.codec_of_node = codec_np;
-
-		/* Parse dai and platform info */
-		at91sam9g20ek_dai.cpu_dai_name = NULL;
-		at91sam9g20ek_dai.platform_name = NULL;
-		cpu_np = of_parse_phandle(np, "atmel,ssc-controller", 0);
-		if (!cpu_np) {
-			dev_err(&pdev->dev, "dai and pcm info missing\n");
-			return -EINVAL;
-		}
-		at91sam9g20ek_dai.cpu_of_node = cpu_np;
-		at91sam9g20ek_dai.platform_of_node = cpu_np;
-
-		of_node_put(codec_np);
-		of_node_put(cpu_np);
+	ret = snd_soc_of_parse_card_name(card, "atmel,model");
+	if (ret)
+		goto err;
+
+	ret = snd_soc_of_parse_audio_routing(card,
+		"atmel,audio-routing");
+	if (ret)
+		goto err;
+
+	/* Parse codec info */
+	at91sam9g20ek_dai.codec_name = NULL;
+	codec_np = of_parse_phandle(np, "atmel,audio-codec", 0);
+	if (!codec_np) {
+		dev_err(&pdev->dev, "codec info missing\n");
+		return -EINVAL;
+	}
+	at91sam9g20ek_dai.codec_of_node = codec_np;
+
+	/* Parse dai and platform info */
+	at91sam9g20ek_dai.cpu_dai_name = NULL;
+	at91sam9g20ek_dai.platform_name = NULL;
+	cpu_np = of_parse_phandle(np, "atmel,ssc-controller", 0);
+	if (!cpu_np) {
+		dev_err(&pdev->dev, "dai and pcm info missing\n");
+		return -EINVAL;
 	}
+	at91sam9g20ek_dai.cpu_of_node = cpu_np;
+	at91sam9g20ek_dai.platform_of_node = cpu_np;
+
+	of_node_put(codec_np);
+	of_node_put(cpu_np);
 
 	ret = snd_soc_register_card(card);
 	if (ret) {
-- 
2.1.0

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

* Re: [PATCH] ASoC: sam9g20_wm8731: drop machine_is_xxx
  2015-01-06 11:14 [PATCH] ASoC: sam9g20_wm8731: drop machine_is_xxx Alexandre Belloni
@ 2015-01-06 12:00 ` Mark Brown
  2015-01-06 12:27   ` Alexandre Belloni
  2015-01-06 17:45 ` Mark Brown
  1 sibling, 1 reply; 9+ messages in thread
From: Mark Brown @ 2015-01-06 12:00 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: Bo Shen, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
	alsa-devel, linux-arm-kernel, linux-kernel, Nicolas Ferre

[-- Attachment #1: Type: text/plain, Size: 224 bytes --]

On Tue, Jan 06, 2015 at 12:14:32PM +0100, Alexandre Belloni wrote:
> Atmel based boards can now only be used with device tree. Drop non DT
> initialization.

This doesn't apply against current code, please check and resend.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

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

* Re: [PATCH] ASoC: sam9g20_wm8731: drop machine_is_xxx
  2015-01-06 12:00 ` Mark Brown
@ 2015-01-06 12:27   ` Alexandre Belloni
  2015-01-06 16:01     ` Mark Brown
  0 siblings, 1 reply; 9+ messages in thread
From: Alexandre Belloni @ 2015-01-06 12:27 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, Takashi Iwai, linux-kernel, Nicolas Ferre,
	Liam Girdwood, Jaroslav Kysela, Bo Shen, linux-arm-kernel

Hi,

On 06/01/2015 at 12:00:49 +0000, Mark Brown wrote :
> On Tue, Jan 06, 2015 at 12:14:32PM +0100, Alexandre Belloni wrote:
> > Atmel based boards can now only be used with device tree. Drop non DT
> > initialization.
> 
> This doesn't apply against current code, please check and resend.

It should apply after "sound: soc: atmel sam9g20_wm8731: remove useless
include". I was based on 3.19-rc2.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* Re: [PATCH] ASoC: sam9g20_wm8731: drop machine_is_xxx
  2015-01-06 12:27   ` Alexandre Belloni
@ 2015-01-06 16:01     ` Mark Brown
  0 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2015-01-06 16:01 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: alsa-devel, Takashi Iwai, linux-kernel, Nicolas Ferre,
	Liam Girdwood, Bo Shen, linux-arm-kernel


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

On Tue, Jan 06, 2015 at 01:27:51PM +0100, Alexandre Belloni wrote:
> On 06/01/2015 at 12:00:49 +0000, Mark Brown wrote :
> > On Tue, Jan 06, 2015 at 12:14:32PM +0100, Alexandre Belloni wrote:

> > > Atmel based boards can now only be used with device tree. Drop non DT
> > > initialization.

> > This doesn't apply against current code, please check and resend.

> It should apply after "sound: soc: atmel sam9g20_wm8731: remove useless
> include". I was based on 3.19-rc2.

So, one reason you should use subject lines matching the style for the
subsystem is that this is a big part of how people find patches to
review...  I'm not 100% sure I still have the patch, the volume is
rather high right now.

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

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



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

* Re: [PATCH] ASoC: sam9g20_wm8731: drop machine_is_xxx
  2015-01-06 11:14 [PATCH] ASoC: sam9g20_wm8731: drop machine_is_xxx Alexandre Belloni
  2015-01-06 12:00 ` Mark Brown
@ 2015-01-06 17:45 ` Mark Brown
  2015-03-02 13:42   ` [alsa-devel] " Alexandre Belloni
  1 sibling, 1 reply; 9+ messages in thread
From: Mark Brown @ 2015-01-06 17:45 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: Bo Shen, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
	alsa-devel, linux-arm-kernel, linux-kernel, Nicolas Ferre

[-- Attachment #1: Type: text/plain, Size: 175 bytes --]

On Tue, Jan 06, 2015 at 12:14:32PM +0100, Alexandre Belloni wrote:
> Atmel based boards can now only be used with device tree. Drop non DT
> initialization.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

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

* Re: [alsa-devel] [PATCH] ASoC: sam9g20_wm8731: drop machine_is_xxx
  2015-01-06 17:45 ` Mark Brown
@ 2015-03-02 13:42   ` Alexandre Belloni
  2015-03-02 14:06     ` Mark Brown
  0 siblings, 1 reply; 9+ messages in thread
From: Alexandre Belloni @ 2015-03-02 13:42 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, Takashi Iwai, linux-kernel, Nicolas Ferre,
	Liam Girdwood, Bo Shen, linux-arm-kernel

Hi Mark,

On 06/01/2015 at 17:45:21 +0000, Mark Brown wrote :
> On Tue, Jan 06, 2015 at 12:14:32PM +0100, Alexandre Belloni wrote:
> > Atmel based boards can now only be used with device tree. Drop non DT
> > initialization.
> 
> Applied, thanks.

I don't see that patch in 4.0-rc1. This will lead to a compilation error
as all the machine_is_at91xxx have been removed.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* Re: [PATCH] ASoC: sam9g20_wm8731: drop machine_is_xxx
  2015-03-02 13:42   ` [alsa-devel] " Alexandre Belloni
@ 2015-03-02 14:06     ` Mark Brown
  2015-03-02 14:19       ` [alsa-devel] " Alexandre Belloni
  0 siblings, 1 reply; 9+ messages in thread
From: Mark Brown @ 2015-03-02 14:06 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: alsa-devel, Takashi Iwai, Nicolas Ferre, linux-kernel,
	Liam Girdwood, Bo Shen, linux-arm-kernel


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

On Mon, Mar 02, 2015 at 02:42:53PM +0100, Alexandre Belloni wrote:
> On 06/01/2015 at 17:45:21 +0000, Mark Brown wrote :
> > On Tue, Jan 06, 2015 at 12:14:32PM +0100, Alexandre Belloni wrote:

> > > Atmel based boards can now only be used with device tree. Drop non DT
> > > initialization.

> > Applied, thanks.

> I don't see that patch in 4.0-rc1. This will lead to a compilation error
> as all the machine_is_at91xxx have been removed.

*sigh*  If something is a bug fix then please flag it as such; nothing
in your message gives any hint that this is a fix rather than just a
random cleanup.

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

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



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

* Re: [alsa-devel] [PATCH] ASoC: sam9g20_wm8731: drop machine_is_xxx
  2015-03-02 14:06     ` Mark Brown
@ 2015-03-02 14:19       ` Alexandre Belloni
  2015-03-02 17:53         ` Mark Brown
  0 siblings, 1 reply; 9+ messages in thread
From: Alexandre Belloni @ 2015-03-02 14:19 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, Takashi Iwai, linux-kernel, Nicolas Ferre,
	Liam Girdwood, Bo Shen, linux-arm-kernel

On 02/03/2015 at 14:06:38 +0000, Mark Brown wrote :
> On Mon, Mar 02, 2015 at 02:42:53PM +0100, Alexandre Belloni wrote:
> > On 06/01/2015 at 17:45:21 +0000, Mark Brown wrote :
> > > On Tue, Jan 06, 2015 at 12:14:32PM +0100, Alexandre Belloni wrote:
> 
> > > > Atmel based boards can now only be used with device tree. Drop non DT
> > > > initialization.
> 
> > > Applied, thanks.
> 
> > I don't see that patch in 4.0-rc1. This will lead to a compilation error
> > as all the machine_is_at91xxx have been removed.
> 
> *sigh*  If something is a bug fix then please flag it as such; nothing
> in your message gives any hint that this is a fix rather than just a
> random cleanup.

Well, I though this would be applied along with
"ASoC: atmel: sam9g20_wm8731: remove useless include" which made it to
4.0-rc1 and was also a simple cleanup.

It was a simple cleanup until all the machine_is_at91xxx got dropped :)

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* Re: [alsa-devel] [PATCH] ASoC: sam9g20_wm8731: drop machine_is_xxx
  2015-03-02 14:19       ` [alsa-devel] " Alexandre Belloni
@ 2015-03-02 17:53         ` Mark Brown
  0 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2015-03-02 17:53 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: alsa-devel, Takashi Iwai, linux-kernel, Nicolas Ferre,
	Liam Girdwood, Bo Shen, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 665 bytes --]

On Mon, Mar 02, 2015 at 03:19:40PM +0100, Alexandre Belloni wrote:
> On 02/03/2015 at 14:06:38 +0000, Mark Brown wrote :

> > *sigh*  If something is a bug fix then please flag it as such; nothing
> > in your message gives any hint that this is a fix rather than just a
> > random cleanup.

> Well, I though this would be applied along with
> "ASoC: atmel: sam9g20_wm8731: remove useless include" which made it to
> 4.0-rc1 and was also a simple cleanup.

That's one line as opposed to an at least mechanically large change.

> It was a simple cleanup until all the machine_is_at91xxx got dropped :)

Which shouldn't have happened while there were still users.  :/

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

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

end of thread, other threads:[~2015-03-02 17:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-06 11:14 [PATCH] ASoC: sam9g20_wm8731: drop machine_is_xxx Alexandre Belloni
2015-01-06 12:00 ` Mark Brown
2015-01-06 12:27   ` Alexandre Belloni
2015-01-06 16:01     ` Mark Brown
2015-01-06 17:45 ` Mark Brown
2015-03-02 13:42   ` [alsa-devel] " Alexandre Belloni
2015-03-02 14:06     ` Mark Brown
2015-03-02 14:19       ` [alsa-devel] " Alexandre Belloni
2015-03-02 17:53         ` Mark Brown

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).