Skip to content

Commit 42fdb67

Browse files
Dr. David Alan Gilberttiwai
authored andcommitted
ALSA: hda: Remove unused snd_hda_add_nid
snd_hda_add_nid() last use was removed in 2014 by commit db8e8a9 ("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>
1 parent f0ccc71 commit 42fdb67

2 files changed

Lines changed: 0 additions & 33 deletions

File tree

sound/pci/hda/hda_codec.c

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1731,37 +1731,6 @@ int snd_hda_ctl_add(struct hda_codec *codec, hda_nid_t nid,
17311731
}
17321732
EXPORT_SYMBOL_GPL(snd_hda_ctl_add);
17331733

1734-
/**
1735-
* snd_hda_add_nid - Assign a NID to a control element
1736-
* @codec: HD-audio codec
1737-
* @kctl: the control element to assign
1738-
* @index: index to kctl
1739-
* @nid: corresponding NID (optional)
1740-
*
1741-
* Add the given control element to an array inside the codec instance.
1742-
* This function is used when #snd_hda_ctl_add cannot be used for 1:1
1743-
* NID:KCTL mapping - for example "Capture Source" selector.
1744-
*/
1745-
int snd_hda_add_nid(struct hda_codec *codec, struct snd_kcontrol *kctl,
1746-
unsigned int index, hda_nid_t nid)
1747-
{
1748-
struct hda_nid_item *item;
1749-
1750-
if (nid > 0) {
1751-
item = snd_array_new(&codec->nids);
1752-
if (!item)
1753-
return -ENOMEM;
1754-
item->kctl = kctl;
1755-
item->index = index;
1756-
item->nid = nid;
1757-
return 0;
1758-
}
1759-
codec_err(codec, "no NID for mapping control %s:%d:%d\n",
1760-
kctl->id.name, kctl->id.index, index);
1761-
return -EINVAL;
1762-
}
1763-
EXPORT_SYMBOL_GPL(snd_hda_add_nid);
1764-
17651734
/**
17661735
* snd_hda_ctls_clear - Clear all controls assigned to the given codec
17671736
* @codec: HD-audio codec

sound/pci/hda/hda_local.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -571,8 +571,6 @@ struct hda_nid_item {
571571

572572
int snd_hda_ctl_add(struct hda_codec *codec, hda_nid_t nid,
573573
struct snd_kcontrol *kctl);
574-
int snd_hda_add_nid(struct hda_codec *codec, struct snd_kcontrol *kctl,
575-
unsigned int index, hda_nid_t nid);
576574
void snd_hda_ctls_clear(struct hda_codec *codec);
577575

578576
/*

0 commit comments

Comments
 (0)