From: linux@treblig.org
To: perex@perex.cz, tiwai@suse.com, linux-sound@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
"Dr. David Alan Gilbert" <linux@treblig.org>
Subject: [PATCH 4/5] ALSA: core: Remove unused snd_device_get_state
Date: Sat, 3 May 2025 00:52:18 +0100 [thread overview]
Message-ID: <20250502235219.1000429-5-linux@treblig.org> (raw)
In-Reply-To: <20250502235219.1000429-1-linux@treblig.org>
From: "Dr. David Alan Gilbert" <linux@treblig.org>
snd_device_get_state() last use was removed in 2022 by
commit 7e1afce5866e ("ALSA: usb-audio: Inform the delayed registration more
properly")
Remove it.
Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
---
include/sound/core.h | 1 -
sound/core/device.c | 23 -----------------------
2 files changed, 24 deletions(-)
diff --git a/include/sound/core.h b/include/sound/core.h
index 1f3f5dccd736..64327e971122 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -326,7 +326,6 @@ void snd_device_disconnect(struct snd_card *card, void *device_data);
void snd_device_disconnect_all(struct snd_card *card);
void snd_device_free(struct snd_card *card, void *device_data);
void snd_device_free_all(struct snd_card *card);
-int snd_device_get_state(struct snd_card *card, void *device_data);
/* isadma.c */
diff --git a/sound/core/device.c b/sound/core/device.c
index b57d80a17052..cdc5af526739 100644
--- a/sound/core/device.c
+++ b/sound/core/device.c
@@ -237,26 +237,3 @@ void snd_device_free_all(struct snd_card *card)
list_for_each_entry_safe_reverse(dev, next, &card->devices, list)
__snd_device_free(dev);
}
-
-/**
- * snd_device_get_state - Get the current state of the given device
- * @card: the card instance
- * @device_data: the data pointer to release
- *
- * Returns the current state of the given device object. For the valid
- * device, either @SNDRV_DEV_BUILD, @SNDRV_DEV_REGISTERED or
- * @SNDRV_DEV_DISCONNECTED is returned.
- * Or for a non-existing device, -1 is returned as an error.
- *
- * Return: the current state, or -1 if not found
- */
-int snd_device_get_state(struct snd_card *card, void *device_data)
-{
- struct snd_device *dev;
-
- dev = look_for_dev(card, device_data);
- if (dev)
- return dev->state;
- return -1;
-}
-EXPORT_SYMBOL_GPL(snd_device_get_state);
--
2.49.0
next prev parent reply other threads:[~2025-05-02 23:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-02 23:52 [PATCH 0/5] ALSA: core: removing unused functions linux
2025-05-02 23:52 ` [PATCH 1/5] ALSA: pcm: Remove unused snd_pcm_rate_range_to_bits linux
2025-05-02 23:52 ` [PATCH 2/5] ALSA: pcm: Remove unused snd_dmaengine_pcm_open_request_chan linux
2025-05-02 23:52 ` [PATCH 3/5] ALSA: seq: Remove unused snd_seq_queue_client_leave_cells linux
2025-05-02 23:52 ` linux [this message]
2025-05-02 23:52 ` [PATCH 5/5] ALSA: core: Remove unused snd_jack_set_parent linux
2025-05-05 10:36 ` [PATCH 0/5] ALSA: core: removing unused functions Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250502235219.1000429-5-linux@treblig.org \
--to=linux@treblig.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox