public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Mark Brown <broonie@kernel.org>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Cc: Cezary Rojewski <cezary.rojewski@intel.com>,
	Liam Girdwood <liam.r.girdwood@linux.intel.com>,
	Peter Ujfalusi <peter.ujfalusi@linux.intel.com>,
	Bard Liao <yung-chuan.liao@linux.intel.com>,
	Ranjani Sridharan <ranjani.sridharan@linux.intel.com>,
	Kai Vehmanen <kai.vehmanen@linux.intel.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>
Subject: Re: [PATCH v1 1/5] ASoC: Intel: bytcht_cx2072x: Replace open coded acpi_dev_put()
Date: Tue, 3 Jan 2023 09:08:20 -0600	[thread overview]
Message-ID: <731b2d59-22f1-a456-bcfc-040a1adccce0@linux.intel.com> (raw)
In-Reply-To: <20230102203037.16120-1-andriy.shevchenko@linux.intel.com>



On 1/2/23 14:30, Andy Shevchenko wrote:
> 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>

Answering for the series: we should make the change across all Intel
machine drivers. I see at least four cases that were missed

bytcr_rt5640.c:         put_device(&adev->dev);
bytcr_rt5651.c:         put_device(&adev->dev);
bytcr_wm5102.c: put_device(&adev->dev);
sof_es8336.c:           put_device(&adev->dev);


> ---
>  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,

  parent reply	other threads:[~2023-01-03 16:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Pierre-Louis Bossart [this message]
2023-01-04 10:29   ` [PATCH v1 1/5] ASoC: Intel: bytcht_cx2072x: " 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

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=731b2d59-22f1-a456-bcfc-040a1adccce0@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=peter.ujfalusi@linux.intel.com \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=tiwai@suse.com \
    --cc=yung-chuan.liao@linux.intel.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