diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-03-03 17:33:10 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-03-23 13:19:35 +0100 |
commit | 71fc4c7ef5ef2d0ddd22f0545ede4c135b554b84 (patch) | |
tree | 2fad250a6c6f229aabd6b1aab41d24a50da511d9 /sound/pci/hda/hda_codec.h | |
parent | e311782acd196d17d25b323d115709c50c8f7d3f (diff) | |
download | blackbird-op-linux-71fc4c7ef5ef2d0ddd22f0545ede4c135b554b84.tar.gz blackbird-op-linux-71fc4c7ef5ef2d0ddd22f0545ede4c135b554b84.zip |
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.h')
-rw-r--r-- | sound/pci/hda/hda_codec.h | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h index 76776164623d..3068163b3db2 100644 --- a/sound/pci/hda/hda_codec.h +++ b/sound/pci/hda/hda_codec.h @@ -30,36 +30,6 @@ #include <sound/hda_verbs.h> /* - * generic arrays - */ -struct snd_array { - unsigned int used; - unsigned int alloced; - unsigned int elem_size; - unsigned int alloc_align; - void *list; -}; - -void *snd_array_new(struct snd_array *array); -void snd_array_free(struct snd_array *array); -static inline void snd_array_init(struct snd_array *array, unsigned int size, - unsigned int align) -{ - array->elem_size = size; - array->alloc_align = align; -} - -static inline void *snd_array_elem(struct snd_array *array, unsigned int idx) -{ - return array->list + idx * array->elem_size; -} - -static inline unsigned int snd_array_index(struct snd_array *array, void *ptr) -{ - return (unsigned long)(ptr - array->list) / array->elem_size; -} - -/* * Structures */ |