aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmadeusz Sławiński <[email protected]>2024-04-03 11:31:36 +0200
committerMark Brown <[email protected]>2024-04-03 11:05:11 +0100
commit27aa58180473f81990f35238dc8aec40d34c778d (patch)
treeca075b6cff4cec4f23a1e36f12f146e160c1da1e
parent953db8ded10fc54e698c2fb5fb4028bf93719ae9 (diff)
ASoC: Intel: avs: hdaudio: Use devm_kstrdup_const
HDA codec name is constant and we just duplicate it, use const variant of devm_kstrdup to possibly save a bit of memory. Reviewed-by: Cezary Rojewski <[email protected]> Signed-off-by: Amadeusz Sławiński <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
-rw-r--r--sound/soc/intel/avs/boards/hdaudio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/intel/avs/boards/hdaudio.c b/sound/soc/intel/avs/boards/hdaudio.c
index 79b4aca41333..2de703b909c3 100644
--- a/sound/soc/intel/avs/boards/hdaudio.c
+++ b/sound/soc/intel/avs/boards/hdaudio.c
@@ -54,7 +54,7 @@ static int avs_create_dai_links(struct device *dev, struct hda_codec *codec, int
if (!dl[i].cpus->dai_name)
return -ENOMEM;
- dl[i].codecs->name = devm_kstrdup(dev, cname, GFP_KERNEL);
+ dl[i].codecs->name = devm_kstrdup_const(dev, cname, GFP_KERNEL);
if (!dl[i].codecs->name)
return -ENOMEM;
@@ -191,7 +191,7 @@ static int avs_hdaudio_probe(struct platform_device *pdev)
if (!binder->platforms || !binder->codecs)
return -ENOMEM;
- binder->codecs->name = devm_kstrdup(dev, dev_name(&codec->core.dev), GFP_KERNEL);
+ binder->codecs->name = devm_kstrdup_const(dev, dev_name(&codec->core.dev), GFP_KERNEL);
if (!binder->codecs->name)
return -ENOMEM;