]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: max98088 codec: Catch driver bugs for eq channel name
authorRyan Mallon <rmallon@gmail.com>
Mon, 3 Oct 2011 22:55:40 +0000 (09:55 +1100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 4 Oct 2011 11:03:35 +0000 (12:03 +0100)
commit1d83ae62f25bcb52b1a89748e5390a94eea3f009
treea6d4bc7bf396c0e5623d702d134c79855fa3f7a6
parentaa72432d4aa9c5725437d9f7c5f1abff7931b52f
ASoC: max98088 codec: Catch driver bugs for eq channel name

Move the EQ channel names to a separate array and iterate over it in
max98088_get_channel rather than duplicating the hardcoded channel
names. Add an error message if an invalid channel is passed and check
the error in the callers.

Also added a BUILD_BUG_ON to ensure that the eq_mode_name and controls
arrays are the same size.

Signed-off-by: Ryan Mallon <rmallon@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/codecs/max98088.c