summaryrefslogtreecommitdiffstats
path: root/sound/core/sound.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-01-30 08:39:40 +0100
committerTakashi Iwai <tiwai@suse.de>2015-02-02 17:01:38 +0100
commit830953c0724b42be30a74febcde6c89c706ed286 (patch)
tree5f647e3a5b09133b9af0f5c1023132624ca7a833 /sound/core/sound.c
parent40a4b263854346fe7c7d1c3964c106296f690816 (diff)
downloadlinux-stable-830953c0724b42be30a74febcde6c89c706ed286.tar.gz
linux-stable-830953c0724b42be30a74febcde6c89c706ed286.tar.bz2
linux-stable-830953c0724b42be30a74febcde6c89c706ed286.zip
ALSA: Drop snd_get_device() helper
Since the device is no longer hidden but embedded into each component, we no longer need snd_get_device(). Let's drop it and relevant codes. Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/sound.c')
-rw-r--r--sound/core/sound.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/sound/core/sound.c b/sound/core/sound.c
index 2e8aeb18d76b..185cec01ee25 100644
--- a/sound/core/sound.c
+++ b/sound/core/sound.c
@@ -303,24 +303,6 @@ int snd_register_device(int type, struct snd_card *card, int dev,
}
EXPORT_SYMBOL(snd_register_device);
-/* find the matching minor record
- * return the index of snd_minor, or -1 if not found
- */
-static int find_snd_minor(int type, struct snd_card *card, int dev)
-{
- int cardnum, minor;
- struct snd_minor *mptr;
-
- cardnum = card ? card->number : -1;
- for (minor = 0; minor < ARRAY_SIZE(snd_minors); ++minor)
- if ((mptr = snd_minors[minor]) != NULL &&
- mptr->type == type &&
- mptr->card == cardnum &&
- mptr->device == dev)
- return minor;
- return -1;
-}
-
/**
* snd_unregister_device - unregister the device on the given card
* @dev: the device instance
@@ -352,31 +334,6 @@ int snd_unregister_device(struct device *dev)
}
EXPORT_SYMBOL(snd_unregister_device);
-/**
- * snd_get_device - get the assigned device to the given type and device number
- * @type: the device type, SNDRV_DEVICE_TYPE_XXX
- * @card:the card instance
- * @dev: the device index
- *
- * The caller needs to release it via put_device() after using it.
- */
-struct device *snd_get_device(int type, struct snd_card *card, int dev)
-{
- int minor;
- struct device *d = NULL;
-
- mutex_lock(&sound_mutex);
- minor = find_snd_minor(type, card, dev);
- if (minor >= 0) {
- d = snd_minors[minor]->dev;
- if (d)
- get_device(d);
- }
- mutex_unlock(&sound_mutex);
- return d;
-}
-EXPORT_SYMBOL(snd_get_device);
-
#ifdef CONFIG_PROC_FS
/*
* INFO PART