summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-03-03 17:33:10 +0100
committerTakashi Iwai <tiwai@suse.de>2015-03-23 13:19:35 +0100
commit71fc4c7ef5ef2d0ddd22f0545ede4c135b554b84 (patch)
tree2fad250a6c6f229aabd6b1aab41d24a50da511d9 /sound/pci/hda/hda_codec.c
parente311782acd196d17d25b323d115709c50c8f7d3f (diff)
downloadlinux-71fc4c7ef5ef2d0ddd22f0545ede4c135b554b84.tar.bz2
ALSA: hda - Move generic array helpers to core lib
This will be used by the regmap support. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r--sound/pci/hda/hda_codec.c46
1 files changed, 0 insertions, 46 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 145cae7903b6..10e257ff9084 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -5012,52 +5012,6 @@ void snd_hda_bus_reset(struct hda_bus *bus)
}
EXPORT_SYMBOL_GPL(snd_hda_bus_reset);
-/*
- * generic arrays
- */
-
-/**
- * snd_array_new - get a new element from the given array
- * @array: the array object
- *
- * Get a new element from the given array. If it exceeds the
- * pre-allocated array size, re-allocate the array.
- *
- * Returns NULL if allocation failed.
- */
-void *snd_array_new(struct snd_array *array)
-{
- if (snd_BUG_ON(!array->elem_size))
- return NULL;
- if (array->used >= array->alloced) {
- int num = array->alloced + array->alloc_align;
- int size = (num + 1) * array->elem_size;
- void *nlist;
- if (snd_BUG_ON(num >= 4096))
- return NULL;
- nlist = krealloc(array->list, size, GFP_KERNEL | __GFP_ZERO);
- if (!nlist)
- return NULL;
- array->list = nlist;
- array->alloced = num;
- }
- return snd_array_elem(array, array->used++);
-}
-EXPORT_SYMBOL_GPL(snd_array_new);
-
-/**
- * snd_array_free - free the given array elements
- * @array: the array object
- */
-void snd_array_free(struct snd_array *array)
-{
- kfree(array->list);
- array->used = 0;
- array->alloced = 0;
- array->list = NULL;
-}
-EXPORT_SYMBOL_GPL(snd_array_free);
-
/**
* snd_print_pcm_bits - Print the supported PCM fmt bits to the string buffer
* @pcm: PCM caps bits