ALSA: core: Remove unused snd_jack_set_parent
authorDr. David Alan Gilbert <linux@treblig.org>
Fri, 2 May 2025 23:52:19 +0000 (00:52 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 5 May 2025 10:36:29 +0000 (12:36 +0200)
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
include/sound/jack.h
sound/core/jack.c

index 1ed90e2109e9be5a803fd49359e328febbbf9d03..36dc104c114537efbf882daa885508dd32361b76 100644 (file)
@@ -79,7 +79,6 @@ int snd_jack_new(struct snd_card *card, const char *id, int type,
                 struct snd_jack **jack, bool initial_kctl, bool phantom_jack);
 int snd_jack_add_new_kctl(struct snd_jack *jack, const char * name, int mask);
 #ifdef CONFIG_SND_JACK_INPUT_DEV
-void snd_jack_set_parent(struct snd_jack *jack, struct device *parent);
 int snd_jack_set_key(struct snd_jack *jack, enum snd_jack_types type,
                     int keytype);
 #endif
@@ -104,11 +103,6 @@ static inline void snd_jack_report(struct snd_jack *jack, int status)
 #endif
 
 #if !defined(CONFIG_SND_JACK) || !defined(CONFIG_SND_JACK_INPUT_DEV)
-static inline void snd_jack_set_parent(struct snd_jack *jack,
-                                      struct device *parent)
-{
-}
-
 static inline int snd_jack_set_key(struct snd_jack *jack,
                                   enum snd_jack_types type,
                                   int keytype)
index e4bcecdf89b7ec0bccb0d113784c32ecf2620a68..850f8234027891abbd465d2e2f6dd57409d51b5c 100644 (file)
@@ -574,25 +574,6 @@ fail_input:
 EXPORT_SYMBOL(snd_jack_new);
 
 #ifdef CONFIG_SND_JACK_INPUT_DEV
-/**
- * snd_jack_set_parent - Set the parent device for a jack
- *
- * @jack:   The jack to configure
- * @parent: The device to set as parent for the jack.
- *
- * Set the parent for the jack devices in the device tree.  This
- * function is only valid prior to registration of the jack.  If no
- * parent is configured then the parent device will be the sound card.
- */
-void snd_jack_set_parent(struct snd_jack *jack, struct device *parent)
-{
-       WARN_ON(jack->registered);
-       guard(mutex)(&jack->input_dev_lock);
-       if (jack->input_dev)
-               jack->input_dev->dev.parent = parent;
-}
-EXPORT_SYMBOL(snd_jack_set_parent);
-
 /**
  * snd_jack_set_key - Set a key mapping on a jack
  *