From: Vinod Koul <vinod.koul@intel.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: alsa-devel@alsa-project.org, broonie@kernel.org,
Thierry Escande <thierry.escande@collabora.com>
Subject: Re: [PATCH] ASoC: Intel: cht_bsw_max98090: remove useless code, align with ChromeOS driver
Date: Mon, 9 Oct 2017 14:46:14 +0530 [thread overview]
Message-ID: <20171009091614.GT30097@localhost> (raw)
In-Reply-To: <20171005040427.26612-1-pierre-louis.bossart@linux.intel.com>
On Wed, Oct 04, 2017 at 11:04:27PM -0500, Pierre-Louis Bossart wrote:
> Remove dead code which was missed in previous changes. This is not
> visible with git diff but there is a test+return on the same condition
> just above.
>
> Also reuse local variable instead of fetching the jack information twice.
>
> Tested on Acer R11 (cyan)
Acked-By: Vinod Koul <vinod.koul@intel.com>
> Fixes: 3bbda5a38601 ('ASoC: Intel: cht_bsw_max98090_ti: Fix jack initialization')
> Cc: Thierry Escande <thierry.escande@collabora.com>
> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> ---
> sound/soc/intel/boards/cht_bsw_max98090_ti.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/sound/soc/intel/boards/cht_bsw_max98090_ti.c b/sound/soc/intel/boards/cht_bsw_max98090_ti.c
> index 74c047a4b05c..119da5503fee 100644
> --- a/sound/soc/intel/boards/cht_bsw_max98090_ti.c
> +++ b/sound/soc/intel/boards/cht_bsw_max98090_ti.c
> @@ -219,10 +219,6 @@ static int cht_codec_init(struct snd_soc_pcm_runtime *runtime)
> return ret;
> }
>
> -
> - if (ctx->ts3a227e_present)
> - snd_soc_jack_notifier_register(jack, &cht_jack_nb);
> -
> ret = snd_soc_jack_add_gpiods(runtime->card->dev->parent, jack,
> ARRAY_SIZE(hs_jack_gpios),
> hs_jack_gpios);
> @@ -323,7 +319,7 @@ static int cht_max98090_headset_init(struct snd_soc_component *component)
> return ret;
> }
>
> - return ts3a227e_enable_jack_detect(component, &ctx->jack);
> + return ts3a227e_enable_jack_detect(component, jack);
> }
>
> static const struct snd_soc_ops cht_aif1_ops = {
> --
> 2.11.0
>
--
~Vinod
next prev parent reply other threads:[~2017-10-09 9:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-05 4:04 [PATCH] ASoC: Intel: cht_bsw_max98090: remove useless code, align with ChromeOS driver Pierre-Louis Bossart
2017-10-09 9:16 ` Vinod Koul [this message]
2017-10-09 10:44 ` Applied "ASoC: Intel: cht_bsw_max98090: remove useless code, align with ChromeOS driver" 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=20171009091614.GT30097@localhost \
--to=vinod.koul@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=thierry.escande@collabora.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).