regulator: gpio-regulator: Set the smallest voltage/current in the specified range

Do not assume the gpio regulator states map is sorted in any order.
This patch ensures we always set the smallest voltage/current that falls within
the specified range.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
1 file changed