ALSA: hda: Remove unused snd_hda_add_nid
authorDr. David Alan Gilbert <linux@treblig.org>
Mon, 5 May 2025 01:09:22 +0000 (02:09 +0100)
committerTakashi Iwai <tiwai@suse.de>
Thu, 8 May 2025 09:49:58 +0000 (11:49 +0200)
snd_hda_add_nid() last use was removed in 2014 by
commit db8e8a9dc972 ("ALSA: hda - Remove the obsoleted static quirk codes
from patch_cmedia.c")

Remove it.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Link: https://patch.msgid.link/20250505010922.340534-1-linux@treblig.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_codec.c
sound/pci/hda/hda_local.h

index b436d436831bbf1d0beda8d6d4bcddfbfa2bdb50..c018beeecd3d601a8f63c71cd473c538dba5c097 100644 (file)
@@ -1731,37 +1731,6 @@ int snd_hda_ctl_add(struct hda_codec *codec, hda_nid_t nid,
 }
 EXPORT_SYMBOL_GPL(snd_hda_ctl_add);
 
-/**
- * snd_hda_add_nid - Assign a NID to a control element
- * @codec: HD-audio codec
- * @kctl: the control element to assign
- * @index: index to kctl
- * @nid: corresponding NID (optional)
- *
- * Add the given control element to an array inside the codec instance.
- * This function is used when #snd_hda_ctl_add cannot be used for 1:1
- * NID:KCTL mapping - for example "Capture Source" selector.
- */
-int snd_hda_add_nid(struct hda_codec *codec, struct snd_kcontrol *kctl,
-                   unsigned int index, hda_nid_t nid)
-{
-       struct hda_nid_item *item;
-
-       if (nid > 0) {
-               item = snd_array_new(&codec->nids);
-               if (!item)
-                       return -ENOMEM;
-               item->kctl = kctl;
-               item->index = index;
-               item->nid = nid;
-               return 0;
-       }
-       codec_err(codec, "no NID for mapping control %s:%d:%d\n",
-                 kctl->id.name, kctl->id.index, index);
-       return -EINVAL;
-}
-EXPORT_SYMBOL_GPL(snd_hda_add_nid);
-
 /**
  * snd_hda_ctls_clear - Clear all controls assigned to the given codec
  * @codec: HD-audio codec
index 4714057dba854bc33d137eecb5fb717373451a17..68c31f5354b7cc3279b5f8cebea26cff3de010a4 100644 (file)
@@ -571,8 +571,6 @@ struct hda_nid_item {
 
 int snd_hda_ctl_add(struct hda_codec *codec, hda_nid_t nid,
                    struct snd_kcontrol *kctl);
-int snd_hda_add_nid(struct hda_codec *codec, struct snd_kcontrol *kctl,
-                   unsigned int index, hda_nid_t nid);
 void snd_hda_ctls_clear(struct hda_codec *codec);
 
 /*