regulator: twl-regulator: Simplify the code matching regulator id
authorAxel Lin <axel.lin@gmail.com>
Mon, 9 Apr 2012 14:32:49 +0000 (22:32 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 10 Apr 2012 10:04:26 +0000 (11:04 +0100)
This patch makes the code easier to read.

Also add checking the case when no desc id is matched. This is required because
if no desc id is matched, the poiner info is pointed to twl_of_match[i].data
which may be not NULL. Checking info is NULL or not latter does not catch the
error.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/regulator/twl-regulator.c

Simple merge