From: Takashi Iwai Date: Tue, 18 Feb 2014 07:11:42 +0000 (+0100) Subject: ASoC: Rename soc_enum.max field with items X-Git-Tag: v3.15-rc1~36^2~1^2~5^2~12^2~29 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a8d38db030f016bee45b927af02d9b46398ed46;p=pandora-kernel.git ASoC: Rename soc_enum.max field with items The name "max" in struct soc_enum is rather confusing since it actually takes the number of items. With "max", one might try to assign (nitems - 1) value. Rename the field to a more appropriate one, "items", which is also used in struct snd_ctl_elem_info, too. This patch also rewrites some code like "if (x > e->nitems - 1)" with "if (x >= e->nitems)". Not only the latter improves the readability, it also fixes a potential bug when e->items is zero. Signed-off-by: Takashi Iwai Acked-by: Liam Girdwood Acked-by: Lars-Peter Clausen Signed-off-by: Mark Brown --- Reading git-diff-tree failed