public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/5] ASoC: Intel: bytcht_cx2072x: Replace open coded acpi_dev_put()
@ 2023-01-02 20:30 Andy Shevchenko
  2023-01-02 20:30 ` [PATCH v1 2/5] ASoC: Intel: bytcht_da7213: " Andy Shevchenko
                   ` (5 more replies)
  0 siblings, 6 replies; 16+ messages in thread
From: Andy Shevchenko @ 2023-01-02 20:30 UTC (permalink / raw)
  To: Mark Brown, Andy Shevchenko, alsa-devel, linux-kernel
  Cc: Cezary Rojewski, Pierre-Louis Bossart, Liam Girdwood,
	Peter Ujfalusi, Bard Liao, Ranjani Sridharan, Kai Vehmanen,
	Jaroslav Kysela, Takashi Iwai

Instead of calling put_device(&adev->dev) where adev is a pointer
to an ACPI device, use specific call, i.e. acpi_dev_put().

Also move it out of the conditional to make it more visible in case
some other code will be added which may use that pointer. We need
to keep a reference as long as we use the pointer.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 sound/soc/intel/boards/bytcht_cx2072x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/intel/boards/bytcht_cx2072x.c b/sound/soc/intel/boards/bytcht_cx2072x.c
index 41cec67157b6..9942a2de6f7a 100644
--- a/sound/soc/intel/boards/bytcht_cx2072x.c
+++ b/sound/soc/intel/boards/bytcht_cx2072x.c
@@ -253,9 +253,9 @@ static int snd_byt_cht_cx2072x_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_cx2072x_dais[dai_index].codecs->name = codec_name;
 	}
+	acpi_dev_put(adev);
 
 	/* override platform name, if required */
 	ret = snd_soc_fixup_dai_links_platform_name(&byt_cht_cx2072x_card,
-- 
2.35.1


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

end of thread, other threads:[~2023-01-09 10:56 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-02 20:30 [PATCH v1 1/5] ASoC: Intel: bytcht_cx2072x: Replace open coded acpi_dev_put() Andy Shevchenko
2023-01-02 20:30 ` [PATCH v1 2/5] ASoC: Intel: bytcht_da7213: " Andy Shevchenko
2023-01-02 20:30 ` [PATCH v1 3/5] ASoC: Intel: cht_bsw_rt5645: " Andy Shevchenko
2023-01-02 20:30 ` [PATCH v1 4/5] ASoC: Intel: cht_bsw_rt5672: " Andy Shevchenko
2023-01-02 20:30 ` [PATCH v1 5/5] ASoC: Intel: sof-wm8804: " Andy Shevchenko
2023-01-03 15:08 ` [PATCH v1 1/5] ASoC: Intel: bytcht_cx2072x: " Pierre-Louis Bossart
2023-01-04 10:29   ` Andy Shevchenko
2023-01-04 14:15     ` Pierre-Louis Bossart
2023-01-04 16:42       ` Mark Brown
2023-01-04 16:48         ` Andy Shevchenko
2023-01-04 17:16           ` Mark Brown
2023-01-04 18:55             ` Andy Shevchenko
2023-01-05 11:46               ` Mark Brown
2023-01-04 16:45       ` Andy Shevchenko
2023-01-09 10:55       ` Andy Shevchenko
2023-01-06 17:04 ` Mark Brown

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