Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ALSA: hda: Remove unused snd_hda_add_nid

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>

authored by

Dr. David Alan Gilbert and committed by
Takashi Iwai
42fdb678 f0ccc717

-33
-31
sound/pci/hda/hda_codec.c
··· 1732 1732 EXPORT_SYMBOL_GPL(snd_hda_ctl_add); 1733 1733 1734 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 - 1765 - /** 1766 1735 * snd_hda_ctls_clear - Clear all controls assigned to the given codec 1767 1736 * @codec: HD-audio codec 1768 1737 */
-2
sound/pci/hda/hda_local.h
··· 571 571 572 572 int snd_hda_ctl_add(struct hda_codec *codec, hda_nid_t nid, 573 573 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); 576 574 void snd_hda_ctls_clear(struct hda_codec *codec); 577 575 578 576 /*