From: Mark Brown Date: Tue, 26 Jun 2012 09:57:51 +0000 (+0100) Subject: regulator: core: Check that the selector from map_voltage() is valid X-Git-Tag: v3.6-rc1~157^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e113d792d56d4b720b3d84c122b6af84c3bfa094;p=pandora-kernel.git regulator: core: Check that the selector from map_voltage() is valid Lots of regulator drivers have checks in their map_voltage() functions to verify that the result of the mapping is in the range originally specified. Factor these out in the core and provide a bit of extra defensiveness for other drivers by doing the check in the core. Since we're now doing a list_voltage() earlier move the current mapping back to a voltage out into the set_voltage() call to save redoing it. Signed-off-by: Mark Brown --- Reading git-diff-tree failed