From: Cezary Rojewski <cezary.rojewski@intel.com>
To: alsa-devel@alsa-project.org, broonie@kernel.org, tiwai@suse.com
Cc: Cezary Rojewski <cezary.rojewski@intel.com>,
kai.vehmanen@linux.intel.com,
pierre-louis.bossart@linux.intel.com, hdegoede@redhat.com,
amadeuszx.slawinski@linux.intel.com
Subject: [RESEND PATCH v2 4/6] ALSA: hda: Always free codec on the device release
Date: Tue, 16 Aug 2022 13:17:25 +0200 [thread overview]
Message-ID: <20220816111727.3218543-5-cezary.rojewski@intel.com> (raw)
In-Reply-To: <20220816111727.3218543-1-cezary.rojewski@intel.com>
With all HDAudio drivers aligned to make use of the same constructor,
have codec freed on the device release regardless of its type.
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
---
sound/pci/hda/hda_codec.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 384426d7e9dd..aa7a362be290 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -883,13 +883,7 @@ static void snd_hda_codec_dev_release(struct device *dev)
snd_hda_sysfs_clear(codec);
kfree(codec->modelname);
kfree(codec->wcaps);
-
- /*
- * In the case of ASoC HD-audio, hda_codec is device managed.
- * It will be freed when the ASoC device is removed.
- */
- if (codec->core.type == HDA_DEV_LEGACY)
- kfree(codec);
+ kfree(codec);
}
#define DEV_NAME_LEN 31
--
2.25.1
next prev parent reply other threads:[~2022-08-16 11:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-16 11:17 [RESEND PATCH v2 0/6] ALSA: hda: Unify codec construction Cezary Rojewski
2022-08-16 11:17 ` [RESEND PATCH v2 1/6] ASoC: Intel: Skylake: Introduce HDA codec init and exit routines Cezary Rojewski
2022-08-16 11:23 ` Mark Brown
2022-08-16 11:17 ` [RESEND PATCH v2 2/6] ASoC: SOF: Intel: " Cezary Rojewski
2022-08-16 11:17 ` [RESEND PATCH v2 3/6] ASoC: Intel: Drop hdac_ext usage for codec device creation Cezary Rojewski
2022-08-16 11:17 ` Cezary Rojewski [this message]
2022-08-16 11:17 ` [RESEND PATCH v2 5/6] ALSA: hda: Remove codec init and exit routines Cezary Rojewski
2022-08-16 11:17 ` [RESEND PATCH v2 6/6] ALSA: hda: Fix page fault in snd_hda_codec_shutdown() Cezary Rojewski
2022-08-16 11:30 ` [RESEND PATCH v2 0/6] ALSA: hda: Unify codec construction Cezary Rojewski
2022-08-18 7:52 ` Takashi Iwai
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=20220816111727.3218543-5-cezary.rojewski@intel.com \
--to=cezary.rojewski@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=amadeuszx.slawinski@linux.intel.com \
--cc=broonie@kernel.org \
--cc=hdegoede@redhat.com \
--cc=kai.vehmanen@linux.intel.com \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=tiwai@suse.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;
as well as URLs for NNTP newsgroup(s).