[alsa-devel] Using ARRAY_SIZE macro when setting up ASoC audio map?
Jarkko Nikula
jarkko.nikula at nokia.com
Thu Feb 28 08:15:39 CET 2008
On Wed, 27 Feb 2008 17:15:49 +0100
"ext Takashi Iwai" <tiwai at suse.de> wrote:
> > /* Set up spitz specific audio path audio_map */
> > - for (i = 0; audio_map[i][0] != NULL; i++) {
> > + for (i = 0; i < ARRAY_SIZE(audio_map); i++) {
>
> Does ARRAY_SIZE() work with two-dimensional arrays? Just wondering...
>
Yes it does when counting number of rows since sizeof(arr[0])
operator in ARRAY_SIZE returns a row size in bytes when used with
two-dimensional array.
--
Jarkko
More information about the Alsa-devel
mailing list