All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: Intel: cht_bsw_max98090: remove useless code, align with ChromeOS driver
@ 2017-10-05  4:04 Pierre-Louis Bossart
  2017-10-09  9:16 ` Vinod Koul
  2017-10-09 10:44 ` Applied "ASoC: Intel: cht_bsw_max98090: remove useless code, align with ChromeOS driver" to the asoc tree Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Pierre-Louis Bossart @ 2017-10-05  4:04 UTC (permalink / raw)
  To: alsa-devel; +Cc: vinod.koul, broonie, Pierre-Louis Bossart, Thierry Escande

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)

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

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

* Re: [PATCH] ASoC: Intel: cht_bsw_max98090: remove useless code, align with ChromeOS driver
  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
  2017-10-09 10:44 ` Applied "ASoC: Intel: cht_bsw_max98090: remove useless code, align with ChromeOS driver" to the asoc tree Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2017-10-09  9:16 UTC (permalink / raw)
  To: Pierre-Louis Bossart; +Cc: alsa-devel, broonie, Thierry Escande

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

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

* Applied "ASoC: Intel: cht_bsw_max98090: remove useless code, align with ChromeOS driver" to the asoc tree
  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
@ 2017-10-09 10:44 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2017-10-09 10:44 UTC (permalink / raw)
  To: Pierre-Louis Bossart; +Cc: vinod.koul, broonie, Thierry Escande, alsa-devel

The patch

   ASoC: Intel: cht_bsw_max98090: remove useless code, align with ChromeOS driver

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 0087f2013188d8b332cee2f74fd3c6754a49f620 Mon Sep 17 00:00:00 2001
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Date: Wed, 4 Oct 2017 23:04:27 -0500
Subject: [PATCH] ASoC: Intel: cht_bsw_max98090: remove useless code, align
 with ChromeOS driver

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)

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>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 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 6519604b9577..a23eba7bb056 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.14.1

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

end of thread, other threads:[~2017-10-09 10:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2017-10-09 10:44 ` Applied "ASoC: Intel: cht_bsw_max98090: remove useless code, align with ChromeOS driver" 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.