public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/6] ASoC: amd: acp-es8336: Drop reference count of ACPI device after use
@ 2023-01-02 20:30 Andy Shevchenko
  2023-01-02 20:30 ` [PATCH v1 2/6] ASoC: Intel: bytcht_es8316: " Andy Shevchenko
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Andy Shevchenko @ 2023-01-02 20:30 UTC (permalink / raw)
  To: Mark Brown, Vijendar Mukunda, Hans de Goede, Pierre-Louis Bossart,
	alsa-devel, linux-kernel
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Cezary Rojewski,
	Peter Ujfalusi, Bard Liao, Ranjani Sridharan, Kai Vehmanen,
	Andy Shevchenko

Theoretically the device might gone if its reference count drops to 0.
This might be the case when we try to find the first physical node of
the ACPI device. We need to keep reference to it until we get a result
of the above mentioned call. Refactor the code to drop the reference
count at the correct place.

While at it, move to acpi_dev_put() as symmetrical call to the
acpi_dev_get_first_match_dev().

Fixes: 02527c3f2300 ("ASoC: amd: add Machine driver for Jadeite platform")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 sound/soc/amd/acp-es8336.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sound/soc/amd/acp-es8336.c b/sound/soc/amd/acp-es8336.c
index 2fe8df86053a..89499542c803 100644
--- a/sound/soc/amd/acp-es8336.c
+++ b/sound/soc/amd/acp-es8336.c
@@ -198,9 +198,11 @@ static int st_es8336_late_probe(struct snd_soc_card *card)
 	int ret;
 
 	adev = acpi_dev_get_first_match_dev("ESSX8336", NULL, -1);
-	if (adev)
-		put_device(&adev->dev);
+	if (!adev)
+		return -ENODEV;
+
 	codec_dev = acpi_get_first_physical_node(adev);
+	acpi_dev_put(adev);
 	if (!codec_dev)
 		dev_err(card->dev, "can not find codec dev\n");
 
-- 
2.35.1


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

* [PATCH v1 2/6] ASoC: Intel: bytcht_es8316: Drop reference count of ACPI device after use
  2023-01-02 20:30 [PATCH v1 1/6] ASoC: amd: acp-es8336: Drop reference count of ACPI device after use Andy Shevchenko
@ 2023-01-02 20:30 ` Andy Shevchenko
  2023-01-11  1:20   ` Pierre-Louis Bossart
  2023-01-02 20:30 ` [PATCH v1 3/6] ASoC: Intel: bytcr_rt5651: " Andy Shevchenko
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 10+ messages in thread
From: Andy Shevchenko @ 2023-01-02 20:30 UTC (permalink / raw)
  To: Mark Brown, Vijendar Mukunda, Hans de Goede, Pierre-Louis Bossart,
	alsa-devel, linux-kernel
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Cezary Rojewski,
	Peter Ujfalusi, Bard Liao, Ranjani Sridharan, Kai Vehmanen,
	Andy Shevchenko

Theoretically the device might gone if its reference count drops to 0.
This might be the case when we try to find the first physical node of
the ACPI device. We need to keep reference to it until we get a result
of the above mentioned call. Refactor the code to drop the reference
count at the correct place.

While at it, move to acpi_dev_put() as symmetrical call to the
acpi_dev_get_first_match_dev().

Fixes: 3c22a73fb873 ("ASoC: Intel: bytcht_es8316: fix HID handling")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 sound/soc/intel/boards/bytcht_es8316.c | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/sound/soc/intel/boards/bytcht_es8316.c b/sound/soc/intel/boards/bytcht_es8316.c
index 09d1f0f6d686..df157b01df8b 100644
--- a/sound/soc/intel/boards/bytcht_es8316.c
+++ b/sound/soc/intel/boards/bytcht_es8316.c
@@ -497,21 +497,28 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev)
 	if (adev) {
 		snprintf(codec_name, sizeof(codec_name),
 			 "i2c-%s", acpi_dev_name(adev));
-		put_device(&adev->dev);
 		byt_cht_es8316_dais[dai_index].codecs->name = codec_name;
 	} else {
 		dev_err(dev, "Error cannot find '%s' dev\n", mach->id);
 		return -ENXIO;
 	}
 
+	codec_dev = acpi_get_first_physical_node(adev);
+	acpi_dev_put(adev);
+	if (!codec_dev)
+		return -EPROBE_DEFER;
+	priv->codec_dev = get_device(codec_dev);
+
 	/* override platform name, if required */
 	byt_cht_es8316_card.dev = dev;
 	platform_name = mach->mach_params.platform;
 
 	ret = snd_soc_fixup_dai_links_platform_name(&byt_cht_es8316_card,
 						    platform_name);
-	if (ret)
+	if (ret) {
+		put_device(codec_dev);
 		return ret;
+	}
 
 	/* Check for BYTCR or other platform and setup quirks */
 	dmi_id = dmi_first_match(byt_cht_es8316_quirk_table);
@@ -539,13 +546,10 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev)
 
 	/* get the clock */
 	priv->mclk = devm_clk_get(dev, "pmc_plt_clk_3");
-	if (IS_ERR(priv->mclk))
+	if (IS_ERR(priv->mclk)) {
+		put_device(codec_dev);
 		return dev_err_probe(dev, PTR_ERR(priv->mclk), "clk_get pmc_plt_clk_3 failed\n");
-
-	codec_dev = acpi_get_first_physical_node(adev);
-	if (!codec_dev)
-		return -EPROBE_DEFER;
-	priv->codec_dev = get_device(codec_dev);
+	}
 
 	if (quirk & BYT_CHT_ES8316_JD_INVERTED)
 		props[cnt++] = PROPERTY_ENTRY_BOOL("everest,jack-detect-inverted");
-- 
2.35.1


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

* [PATCH v1 3/6] ASoC: Intel: bytcr_rt5651: Drop reference count of ACPI device after use
  2023-01-02 20:30 [PATCH v1 1/6] ASoC: amd: acp-es8336: Drop reference count of ACPI device after use Andy Shevchenko
  2023-01-02 20:30 ` [PATCH v1 2/6] ASoC: Intel: bytcht_es8316: " Andy Shevchenko
@ 2023-01-02 20:30 ` Andy Shevchenko
  2023-01-02 20:30 ` [PATCH v1 4/6] ASoC: Intel: bytcr_rt5640: " Andy Shevchenko
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Andy Shevchenko @ 2023-01-02 20:30 UTC (permalink / raw)
  To: Mark Brown, Vijendar Mukunda, Hans de Goede, Pierre-Louis Bossart,
	alsa-devel, linux-kernel
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Cezary Rojewski,
	Peter Ujfalusi, Bard Liao, Ranjani Sridharan, Kai Vehmanen,
	Andy Shevchenko

Theoretically the device might gone if its reference count drops to 0.
This might be the case when we try to find the first physical node of
the ACPI device. We need to keep reference to it until we get a result
of the above mentioned call. Refactor the code to drop the reference
count at the correct place.

While at it, move to acpi_dev_put() as symmetrical call to the
acpi_dev_get_first_match_dev().

Fixes: 02c0a3b3047f ("ASoC: Intel: bytcr_rt5651: add MCLK, quirks and cleanups")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 sound/soc/intel/boards/bytcr_rt5651.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index 81ac6eeda2e6..8fca9b82d4d0 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -922,7 +922,6 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev)
 	if (adev) {
 		snprintf(byt_rt5651_codec_name, sizeof(byt_rt5651_codec_name),
 			 "i2c-%s", acpi_dev_name(adev));
-		put_device(&adev->dev);
 		byt_rt5651_dais[dai_index].codecs->name = byt_rt5651_codec_name;
 	} else {
 		dev_err(dev, "Error cannot find '%s' dev\n", mach->id);
@@ -930,6 +929,7 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev)
 	}
 
 	codec_dev = acpi_get_first_physical_node(adev);
+	acpi_dev_put(adev);
 	if (!codec_dev)
 		return -EPROBE_DEFER;
 	priv->codec_dev = get_device(codec_dev);
-- 
2.35.1


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

* [PATCH v1 4/6] ASoC: Intel: bytcr_rt5640: Drop reference count of ACPI device after use
  2023-01-02 20:30 [PATCH v1 1/6] ASoC: amd: acp-es8336: Drop reference count of ACPI device after use Andy Shevchenko
  2023-01-02 20:30 ` [PATCH v1 2/6] ASoC: Intel: bytcht_es8316: " Andy Shevchenko
  2023-01-02 20:30 ` [PATCH v1 3/6] ASoC: Intel: bytcr_rt5651: " Andy Shevchenko
@ 2023-01-02 20:30 ` Andy Shevchenko
  2023-01-02 20:30 ` [PATCH v1 5/6] ASoC: Intel: bytcr_wm5102: " Andy Shevchenko
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Andy Shevchenko @ 2023-01-02 20:30 UTC (permalink / raw)
  To: Mark Brown, Vijendar Mukunda, Hans de Goede, Pierre-Louis Bossart,
	alsa-devel, linux-kernel
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Cezary Rojewski,
	Peter Ujfalusi, Bard Liao, Ranjani Sridharan, Kai Vehmanen,
	Andy Shevchenko

Theoretically the device might gone if its reference count drops to 0.
This might be the case when we try to find the first physical node of
the ACPI device. We need to keep reference to it until we get a result
of the above mentioned call. Refactor the code to drop the reference
count at the correct place.

While at it, move to acpi_dev_put() as symmetrical call to the
acpi_dev_get_first_match_dev().

Fixes: a232b96dcece ("ASoC: Intel: bytcr_rt5640: use HID translation util")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 sound/soc/intel/boards/bytcr_rt5640.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c
index 4699ca79f3ea..79e0039c79a3 100644
--- a/sound/soc/intel/boards/bytcr_rt5640.c
+++ b/sound/soc/intel/boards/bytcr_rt5640.c
@@ -1636,13 +1636,18 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)
 	if (adev) {
 		snprintf(byt_rt5640_codec_name, sizeof(byt_rt5640_codec_name),
 			 "i2c-%s", acpi_dev_name(adev));
-		put_device(&adev->dev);
 		byt_rt5640_dais[dai_index].codecs->name = byt_rt5640_codec_name;
 	} else {
 		dev_err(dev, "Error cannot find '%s' dev\n", mach->id);
 		return -ENXIO;
 	}
 
+	codec_dev = acpi_get_first_physical_node(adev);
+	acpi_dev_put(adev);
+	if (!codec_dev)
+		return -EPROBE_DEFER;
+	priv->codec_dev = get_device(codec_dev);
+
 	/*
 	 * swap SSP0 if bytcr is detected
 	 * (will be overridden if DMI quirk is detected)
@@ -1717,11 +1722,6 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)
 		byt_rt5640_quirk = quirk_override;
 	}
 
-	codec_dev = acpi_get_first_physical_node(adev);
-	if (!codec_dev)
-		return -EPROBE_DEFER;
-	priv->codec_dev = get_device(codec_dev);
-
 	if (byt_rt5640_quirk & BYT_RT5640_JD_HP_ELITEP_1000G2) {
 		acpi_dev_add_driver_gpios(ACPI_COMPANION(priv->codec_dev),
 					  byt_rt5640_hp_elitepad_1000g2_gpios);
-- 
2.35.1


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

* [PATCH v1 5/6] ASoC: Intel: bytcr_wm5102: Drop reference count of ACPI device after use
  2023-01-02 20:30 [PATCH v1 1/6] ASoC: amd: acp-es8336: Drop reference count of ACPI device after use Andy Shevchenko
                   ` (2 preceding siblings ...)
  2023-01-02 20:30 ` [PATCH v1 4/6] ASoC: Intel: bytcr_rt5640: " Andy Shevchenko
@ 2023-01-02 20:30 ` Andy Shevchenko
  2023-01-02 20:30 ` [PATCH v1 6/6] ASoC: Intel: sof_es8336: " Andy Shevchenko
  2023-01-11  3:05 ` [PATCH v1 1/6] ASoC: amd: acp-es8336: " Mukunda,Vijendar
  5 siblings, 0 replies; 10+ messages in thread
From: Andy Shevchenko @ 2023-01-02 20:30 UTC (permalink / raw)
  To: Mark Brown, Vijendar Mukunda, Hans de Goede, Pierre-Louis Bossart,
	alsa-devel, linux-kernel
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Cezary Rojewski,
	Peter Ujfalusi, Bard Liao, Ranjani Sridharan, Kai Vehmanen,
	Andy Shevchenko

Theoretically the device might gone if its reference count drops to 0.
This might be the case when we try to find the first physical node of
the ACPI device. We need to keep reference to it until we get a result
of the above mentioned call. Refactor the code to drop the reference
count at the correct place.

While at it, move to acpi_dev_put() as symmetrical call to the
acpi_dev_get_first_match_dev().

Fixes: 9a87fc1e0619 ("ASoC: Intel: bytcr_wm5102: Add machine driver for BYT/WM5102")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 sound/soc/intel/boards/bytcr_wm5102.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/intel/boards/bytcr_wm5102.c b/sound/soc/intel/boards/bytcr_wm5102.c
index 1669eb3bd80f..c0706537f673 100644
--- a/sound/soc/intel/boards/bytcr_wm5102.c
+++ b/sound/soc/intel/boards/bytcr_wm5102.c
@@ -411,9 +411,9 @@ static int snd_byt_wm5102_mc_probe(struct platform_device *pdev)
 		return -ENOENT;
 	}
 	snprintf(codec_name, sizeof(codec_name), "spi-%s", acpi_dev_name(adev));
-	put_device(&adev->dev);
 
 	codec_dev = bus_find_device_by_name(&spi_bus_type, NULL, codec_name);
+	acpi_dev_put(adev);
 	if (!codec_dev)
 		return -EPROBE_DEFER;
 
-- 
2.35.1


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

* [PATCH v1 6/6] ASoC: Intel: sof_es8336: Drop reference count of ACPI device after use
  2023-01-02 20:30 [PATCH v1 1/6] ASoC: amd: acp-es8336: Drop reference count of ACPI device after use Andy Shevchenko
                   ` (3 preceding siblings ...)
  2023-01-02 20:30 ` [PATCH v1 5/6] ASoC: Intel: bytcr_wm5102: " Andy Shevchenko
@ 2023-01-02 20:30 ` Andy Shevchenko
  2023-01-11  3:05 ` [PATCH v1 1/6] ASoC: amd: acp-es8336: " Mukunda,Vijendar
  5 siblings, 0 replies; 10+ messages in thread
From: Andy Shevchenko @ 2023-01-02 20:30 UTC (permalink / raw)
  To: Mark Brown, Vijendar Mukunda, Hans de Goede, Pierre-Louis Bossart,
	alsa-devel, linux-kernel
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Cezary Rojewski,
	Peter Ujfalusi, Bard Liao, Ranjani Sridharan, Kai Vehmanen,
	Andy Shevchenko

Theoretically the device might gone if its reference count drops to 0.
This might be the case when we try to find the first physical node of
the ACPI device. We need to keep reference to it until we get a result
of the above mentioned call. Refactor the code to drop the reference
count at the correct place.

While at it, move to acpi_dev_put() as symmetrical call to the
acpi_dev_get_first_match_dev().

Fixes: a164137ce91a ("ASoC: Intel: add machine driver for SOF+ES8336")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 sound/soc/intel/boards/sof_es8336.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/sound/soc/intel/boards/sof_es8336.c b/sound/soc/intel/boards/sof_es8336.c
index 773e5d1d87d4..894b6610b9e2 100644
--- a/sound/soc/intel/boards/sof_es8336.c
+++ b/sound/soc/intel/boards/sof_es8336.c
@@ -681,7 +681,6 @@ static int sof_es8336_probe(struct platform_device *pdev)
 	if (adev) {
 		snprintf(codec_name, sizeof(codec_name),
 			 "i2c-%s", acpi_dev_name(adev));
-		put_device(&adev->dev);
 		dai_links[0].codecs->name = codec_name;
 
 		/* also fixup codec dai name if relevant */
@@ -692,16 +691,19 @@ static int sof_es8336_probe(struct platform_device *pdev)
 		return -ENXIO;
 	}
 
-	ret = snd_soc_fixup_dai_links_platform_name(&sof_es8336_card,
-						    mach->mach_params.platform);
-	if (ret)
-		return ret;
-
 	codec_dev = acpi_get_first_physical_node(adev);
+	acpi_dev_put(adev);
 	if (!codec_dev)
 		return -EPROBE_DEFER;
 	priv->codec_dev = get_device(codec_dev);
 
+	ret = snd_soc_fixup_dai_links_platform_name(&sof_es8336_card,
+						    mach->mach_params.platform);
+	if (ret) {
+		put_device(codec_dev);
+		return ret;
+	}
+
 	if (quirk & SOF_ES8336_JD_INVERTED)
 		props[cnt++] = PROPERTY_ENTRY_BOOL("everest,jack-detect-inverted");
 
-- 
2.35.1


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

* Re: [PATCH v1 2/6] ASoC: Intel: bytcht_es8316: Drop reference count of ACPI device after use
  2023-01-02 20:30 ` [PATCH v1 2/6] ASoC: Intel: bytcht_es8316: " Andy Shevchenko
@ 2023-01-11  1:20   ` Pierre-Louis Bossart
  2023-01-12 11:24     ` Andy Shevchenko
  0 siblings, 1 reply; 10+ messages in thread
From: Pierre-Louis Bossart @ 2023-01-11  1:20 UTC (permalink / raw)
  To: Andy Shevchenko, Mark Brown, Vijendar Mukunda, Hans de Goede,
	alsa-devel, linux-kernel
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Cezary Rojewski,
	Peter Ujfalusi, Bard Liao, Ranjani Sridharan, Kai Vehmanen



On 1/2/23 14:30, Andy Shevchenko wrote:
> Theoretically the device might gone if its reference count drops to 0.
> This might be the case when we try to find the first physical node of
> the ACPI device. We need to keep reference to it until we get a result
> of the above mentioned call. Refactor the code to drop the reference
> count at the correct place.
> 
> While at it, move to acpi_dev_put() as symmetrical call to the
> acpi_dev_get_first_match_dev().
> 
> Fixes: 3c22a73fb873 ("ASoC: Intel: bytcht_es8316: fix HID handling")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

How do we proceed for this patchset? I am happy to ack a v2 if Andy
splits the AMD and Intel patches w/ a cover letter, but this could also
be added directly if there is no objection.

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

* Re: [PATCH v1 1/6] ASoC: amd: acp-es8336: Drop reference count of ACPI device after use
  2023-01-02 20:30 [PATCH v1 1/6] ASoC: amd: acp-es8336: Drop reference count of ACPI device after use Andy Shevchenko
                   ` (4 preceding siblings ...)
  2023-01-02 20:30 ` [PATCH v1 6/6] ASoC: Intel: sof_es8336: " Andy Shevchenko
@ 2023-01-11  3:05 ` Mukunda,Vijendar
  2023-01-12 11:24   ` Andy Shevchenko
  5 siblings, 1 reply; 10+ messages in thread
From: Mukunda,Vijendar @ 2023-01-11  3:05 UTC (permalink / raw)
  To: Andy Shevchenko, Mark Brown, Hans de Goede, Pierre-Louis Bossart,
	alsa-devel, linux-kernel
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Cezary Rojewski,
	Peter Ujfalusi, Bard Liao, Ranjani Sridharan, Kai Vehmanen

On 03/01/23 02:00, Andy Shevchenko wrote:
> Theoretically the device might gone if its reference count drops to 0.
> This might be the case when we try to find the first physical node of
> the ACPI device. We need to keep reference to it until we get a result
> of the above mentioned call. Refactor the code to drop the reference
> count at the correct place.
>
> While at it, move to acpi_dev_put() as symmetrical call to the
> acpi_dev_get_first_match_dev().
>
> Fixes: 02527c3f2300 ("ASoC: amd: add Machine driver for Jadeite platform")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
> ---
>  sound/soc/amd/acp-es8336.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/sound/soc/amd/acp-es8336.c b/sound/soc/amd/acp-es8336.c
> index 2fe8df86053a..89499542c803 100644
> --- a/sound/soc/amd/acp-es8336.c
> +++ b/sound/soc/amd/acp-es8336.c
> @@ -198,9 +198,11 @@ static int st_es8336_late_probe(struct snd_soc_card *card)
>  	int ret;
>  
>  	adev = acpi_dev_get_first_match_dev("ESSX8336", NULL, -1);
> -	if (adev)
> -		put_device(&adev->dev);
> +	if (!adev)
> +		return -ENODEV;
> +
>  	codec_dev = acpi_get_first_physical_node(adev);
> +	acpi_dev_put(adev);
>  	if (!codec_dev)
>  		dev_err(card->dev, "can not find codec dev\n");
>  


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

* Re: [PATCH v1 1/6] ASoC: amd: acp-es8336: Drop reference count of ACPI device after use
  2023-01-11  3:05 ` [PATCH v1 1/6] ASoC: amd: acp-es8336: " Mukunda,Vijendar
@ 2023-01-12 11:24   ` Andy Shevchenko
  0 siblings, 0 replies; 10+ messages in thread
From: Andy Shevchenko @ 2023-01-12 11:24 UTC (permalink / raw)
  To: Mukunda,Vijendar
  Cc: Mark Brown, Hans de Goede, Pierre-Louis Bossart, alsa-devel,
	linux-kernel, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
	Cezary Rojewski, Peter Ujfalusi, Bard Liao, Ranjani Sridharan,
	Kai Vehmanen

On Wed, Jan 11, 2023 at 08:35:41AM +0530, Mukunda,Vijendar wrote:
> On 03/01/23 02:00, Andy Shevchenko wrote:
> > Theoretically the device might gone if its reference count drops to 0.
> > This might be the case when we try to find the first physical node of
> > the ACPI device. We need to keep reference to it until we get a result
> > of the above mentioned call. Refactor the code to drop the reference
> > count at the correct place.
> >
> > While at it, move to acpi_dev_put() as symmetrical call to the
> > acpi_dev_get_first_match_dev().
> >
> > Fixes: 02527c3f2300 ("ASoC: amd: add Machine driver for Jadeite platform")
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Acked-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>

Thank you and HNY!

I have split this patch separately and sent as v2.

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH v1 2/6] ASoC: Intel: bytcht_es8316: Drop reference count of ACPI device after use
  2023-01-11  1:20   ` Pierre-Louis Bossart
@ 2023-01-12 11:24     ` Andy Shevchenko
  0 siblings, 0 replies; 10+ messages in thread
From: Andy Shevchenko @ 2023-01-12 11:24 UTC (permalink / raw)
  To: Pierre-Louis Bossart
  Cc: Mark Brown, Vijendar Mukunda, Hans de Goede, alsa-devel,
	linux-kernel, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
	Cezary Rojewski, Peter Ujfalusi, Bard Liao, Ranjani Sridharan,
	Kai Vehmanen

On Tue, Jan 10, 2023 at 07:20:08PM -0600, Pierre-Louis Bossart wrote:
> On 1/2/23 14:30, Andy Shevchenko wrote:
> > Theoretically the device might gone if its reference count drops to 0.
> > This might be the case when we try to find the first physical node of
> > the ACPI device. We need to keep reference to it until we get a result
> > of the above mentioned call. Refactor the code to drop the reference
> > count at the correct place.
> > 
> > While at it, move to acpi_dev_put() as symmetrical call to the
> > acpi_dev_get_first_match_dev().
> > 
> > Fixes: 3c22a73fb873 ("ASoC: Intel: bytcht_es8316: fix HID handling")
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> How do we proceed for this patchset? I am happy to ack a v2 if Andy
> splits the AMD and Intel patches w/ a cover letter, but this could also
> be added directly if there is no objection.

I have split out the AMD stuff, so I will resend v2 without it and with cover
letter.

-- 
With Best Regards,
Andy Shevchenko



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

end of thread, other threads:[~2023-01-12 11:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-02 20:30 [PATCH v1 1/6] ASoC: amd: acp-es8336: Drop reference count of ACPI device after use Andy Shevchenko
2023-01-02 20:30 ` [PATCH v1 2/6] ASoC: Intel: bytcht_es8316: " Andy Shevchenko
2023-01-11  1:20   ` Pierre-Louis Bossart
2023-01-12 11:24     ` Andy Shevchenko
2023-01-02 20:30 ` [PATCH v1 3/6] ASoC: Intel: bytcr_rt5651: " Andy Shevchenko
2023-01-02 20:30 ` [PATCH v1 4/6] ASoC: Intel: bytcr_rt5640: " Andy Shevchenko
2023-01-02 20:30 ` [PATCH v1 5/6] ASoC: Intel: bytcr_wm5102: " Andy Shevchenko
2023-01-02 20:30 ` [PATCH v1 6/6] ASoC: Intel: sof_es8336: " Andy Shevchenko
2023-01-11  3:05 ` [PATCH v1 1/6] ASoC: amd: acp-es8336: " Mukunda,Vijendar
2023-01-12 11:24   ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox