From: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> To: <broonie@kernel.org> Cc: <patches@opensource.wolfsonmicro.com>, <alsa-devel@alsa-project.org>, <linux-kernel@vger.kernel.org> Subject: [PATCH] ASoC: arizona: In arizona_calc_fratio make new codecs the default case Date: Wed, 16 Dec 2015 17:06:24 +0000 [thread overview] Message-ID: <1450285584-14472-1-git-send-email-rf@opensource.wolfsonmicro.com> (raw) 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
WARNING: multiple messages have this Message-ID (diff)
From: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> To: broonie@kernel.org Cc: patches@opensource.wolfsonmicro.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH] ASoC: arizona: In arizona_calc_fratio make new codecs the default case Date: Wed, 16 Dec 2015 17:06:24 +0000 [thread overview] Message-ID: <1450285584-14472-1-git-send-email-rf@opensource.wolfsonmicro.com> (raw) 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
next reply other threads:[~2015-12-16 17:06 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-12-16 17:06 Richard Fitzgerald [this message] 2015-12-16 17:06 ` [PATCH] ASoC: arizona: In arizona_calc_fratio make new codecs the default case 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
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1450285584-14472-1-git-send-email-rf@opensource.wolfsonmicro.com \ --to=rf@opensource.wolfsonmicro.com \ --cc=alsa-devel@alsa-project.org \ --cc=broonie@kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=patches@opensource.wolfsonmicro.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.