From 3b55d30f6ff2f16c5fd02685bff7639211e6d326 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 23 Jun 2015 15:38:58 -0600 Subject: dm: pmic: Split output from function The regulator_autoset() function mixes printf() output and PMIC adjustment code. It provides a boolean to control the output. It is better to avoid missing logic and output, and this permits a smaller SPL code size. So split the output into a separate function. Also rename the function to have a by_name() suffix, since we would like to be able to pass a device when we know it, and thus avoid the name search. Signed-off-by: Simon Glass Tested-by: Przemyslaw Marczak Acked-by: Przemyslaw Marczak --- test/dm/regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/dm/regulator.c b/test/dm/regulator.c index d279c04..3d0056f 100644 --- a/test/dm/regulator.c +++ b/test/dm/regulator.c @@ -210,7 +210,7 @@ static int dm_test_power_regulator_autoset(struct unit_test_state *uts) * Expected output state: uV=1200000; uA=200000; output enabled */ platname = regulator_names[BUCK1][PLATNAME]; - ut_assertok(regulator_autoset(platname, &dev_autoset, false)); + ut_assertok(regulator_autoset_by_name(platname, &dev_autoset)); /* Check, that the returned device is proper */ ut_assertok(regulator_get_by_platname(platname, &dev)); -- cgit v1.1