From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Mark Brown <broonie@kernel.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Cc: Cezary Rojewski <cezary.rojewski@intel.com>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.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: [PATCH v1 2/5] ASoC: Intel: bytcht_da7213: Replace open coded acpi_dev_put()
Date: Mon, 2 Jan 2023 22:30:34 +0200 [thread overview]
Message-ID: <20230102203037.16120-2-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20230102203037.16120-1-andriy.shevchenko@linux.intel.com>
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_da7213.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/intel/boards/bytcht_da7213.c b/sound/soc/intel/boards/bytcht_da7213.c
index a0c8f1d3f8ce..a3b0cfab17b0 100644
--- a/sound/soc/intel/boards/bytcht_da7213.c
+++ b/sound/soc/intel/boards/bytcht_da7213.c
@@ -256,9 +256,9 @@ static int bytcht_da7213_probe(struct platform_device *pdev)
if (adev) {
snprintf(codec_name, sizeof(codec_name),
"i2c-%s", acpi_dev_name(adev));
- put_device(&adev->dev);
dailink[dai_index].codecs->name = codec_name;
}
+ acpi_dev_put(adev);
/* override platform name, if required */
platform_name = mach->mach_params.platform;
--
2.35.1
next prev parent reply other threads:[~2023-01-02 20:31 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 ` Andy Shevchenko [this message]
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
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=20230102203037.16120-2-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--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=pierre-louis.bossart@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