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

ALSA: core: Remove unused snd_jack_set_parent

snd_jack_set_parent() was added as part of 2008's
commit e76d8ceaaff9 ("ALSA: Add jack reporting API")

but hasn't been used.

Remove it.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250502235219.1000429-6-linux@treblig.org

authored by

Dr. David Alan Gilbert and committed by
Takashi Iwai
307addcc 625a4681

-25
-6
include/sound/jack.h
··· 79 79 struct snd_jack **jack, bool initial_kctl, bool phantom_jack); 80 80 int snd_jack_add_new_kctl(struct snd_jack *jack, const char * name, int mask); 81 81 #ifdef CONFIG_SND_JACK_INPUT_DEV 82 - void snd_jack_set_parent(struct snd_jack *jack, struct device *parent); 83 82 int snd_jack_set_key(struct snd_jack *jack, enum snd_jack_types type, 84 83 int keytype); 85 84 #endif ··· 103 104 #endif 104 105 105 106 #if !defined(CONFIG_SND_JACK) || !defined(CONFIG_SND_JACK_INPUT_DEV) 106 - static inline void snd_jack_set_parent(struct snd_jack *jack, 107 - struct device *parent) 108 - { 109 - } 110 - 111 107 static inline int snd_jack_set_key(struct snd_jack *jack, 112 108 enum snd_jack_types type, 113 109 int keytype)
-19
sound/core/jack.c
··· 575 575 576 576 #ifdef CONFIG_SND_JACK_INPUT_DEV 577 577 /** 578 - * snd_jack_set_parent - Set the parent device for a jack 579 - * 580 - * @jack: The jack to configure 581 - * @parent: The device to set as parent for the jack. 582 - * 583 - * Set the parent for the jack devices in the device tree. This 584 - * function is only valid prior to registration of the jack. If no 585 - * parent is configured then the parent device will be the sound card. 586 - */ 587 - void snd_jack_set_parent(struct snd_jack *jack, struct device *parent) 588 - { 589 - WARN_ON(jack->registered); 590 - guard(mutex)(&jack->input_dev_lock); 591 - if (jack->input_dev) 592 - jack->input_dev->dev.parent = parent; 593 - } 594 - EXPORT_SYMBOL(snd_jack_set_parent); 595 - 596 - /** 597 578 * snd_jack_set_key - Set a key mapping on a jack 598 579 * 599 580 * @jack: The jack to configure