All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: arizona: In arizona_calc_fratio make new codecs the default case
@ 2015-12-16 17:06 ` Richard Fitzgerald
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Fitzgerald @ 2015-12-16 17:06 UTC (permalink / raw)
  To: broonie; +Cc: patches, alsa-devel, linux-kernel

This patch rearranges the switch statement in arizona_calc_fratio so
that older codecs are the special cases, with the default case
applying to newer codecs (WM8998 and later). This is preferable
because it avoids having to patch new cases in every time a new
codec is added.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
---
 sound/soc/codecs/arizona.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c
index d90b3c5..38a73e3 100644
--- a/sound/soc/codecs/arizona.c
+++ b/sound/soc/codecs/arizona.c
@@ -2020,18 +2020,18 @@ static int arizona_calc_fratio(struct arizona_fll *fll,
 	}
 
 	switch (fll->arizona->type) {
+	case WM5102:
+	case WM8997:
+		return init_ratio;
 	case WM5110:
 	case WM8280:
 		if (fll->arizona->rev < 3 || sync)
 			return init_ratio;
 		break;
-	case WM8998:
-	case WM1814:
+	default:
 		if (sync)
 			return init_ratio;
 		break;
-	default:
-		return init_ratio;
 	}
 
 	cfg->fratio = init_ratio - 1;
-- 
1.9.1


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

* [PATCH] ASoC: arizona: In arizona_calc_fratio make new codecs the default case
@ 2015-12-16 17:06 ` Richard Fitzgerald
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Fitzgerald @ 2015-12-16 17:06 UTC (permalink / raw)
  To: broonie; +Cc: patches, alsa-devel, linux-kernel

This patch rearranges the switch statement in arizona_calc_fratio so
that older codecs are the special cases, with the default case
applying to newer codecs (WM8998 and later). This is preferable
because it avoids having to patch new cases in every time a new
codec is added.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
---
 sound/soc/codecs/arizona.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c
index d90b3c5..38a73e3 100644
--- a/sound/soc/codecs/arizona.c
+++ b/sound/soc/codecs/arizona.c
@@ -2020,18 +2020,18 @@ static int arizona_calc_fratio(struct arizona_fll *fll,
 	}
 
 	switch (fll->arizona->type) {
+	case WM5102:
+	case WM8997:
+		return init_ratio;
 	case WM5110:
 	case WM8280:
 		if (fll->arizona->rev < 3 || sync)
 			return init_ratio;
 		break;
-	case WM8998:
-	case WM1814:
+	default:
 		if (sync)
 			return init_ratio;
 		break;
-	default:
-		return init_ratio;
 	}
 
 	cfg->fratio = init_ratio - 1;
-- 
1.9.1

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

* Applied "ASoC: arizona: In arizona_calc_fratio make new codecs the default case" to the asoc tree
  2015-12-16 17:06 ` Richard Fitzgerald
  (?)
@ 2015-12-16 19:24 ` Mark Brown
  -1 siblings, 0 replies; 3+ messages in thread
From: Mark Brown @ 2015-12-16 19:24 UTC (permalink / raw)
  To: Richard Fitzgerald, Mark Brown; +Cc: alsa-devel

The patch

   ASoC: arizona: In arizona_calc_fratio make new codecs the default case

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 3451eb485aee78f31a8dd127e3385f89946c813b Mon Sep 17 00:00:00 2001
From: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Date: Wed, 16 Dec 2015 17:06:24 +0000
Subject: [PATCH] ASoC: arizona: In arizona_calc_fratio make new codecs the
 default case

This patch rearranges the switch statement in arizona_calc_fratio so
that older codecs are the special cases, with the default case
applying to newer codecs (WM8998 and later). This is preferable
because it avoids having to patch new cases in every time a new
codec is added.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/arizona.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c
index d90b3c51019a..38a73e3da508 100644
--- a/sound/soc/codecs/arizona.c
+++ b/sound/soc/codecs/arizona.c
@@ -2020,18 +2020,18 @@ static int arizona_calc_fratio(struct arizona_fll *fll,
 	}
 
 	switch (fll->arizona->type) {
+	case WM5102:
+	case WM8997:
+		return init_ratio;
 	case WM5110:
 	case WM8280:
 		if (fll->arizona->rev < 3 || sync)
 			return init_ratio;
 		break;
-	case WM8998:
-	case WM1814:
+	default:
 		if (sync)
 			return init_ratio;
 		break;
-	default:
-		return init_ratio;
 	}
 
 	cfg->fratio = init_ratio - 1;
-- 
2.6.2

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

end of thread, other threads:[~2015-12-16 19:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-16 17:06 [PATCH] ASoC: arizona: In arizona_calc_fratio make new codecs the default case Richard Fitzgerald
2015-12-16 17:06 ` Richard Fitzgerald
2015-12-16 19:24 ` Applied "ASoC: arizona: In arizona_calc_fratio make new codecs the default case" to the asoc tree 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.