Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3a54854b authored by Puneet Yatnal's avatar Puneet Yatnal Committed by Gerrit - the friendly Code Review server
Browse files

drivers: iio: imu: power off regulator only if regulator_check is enabled



The power down of asm330 regulator is not necessary if regulator_check
is disabled because regulator is initialised based on regulator_check
enablement.

Change-Id: Ida6c86258ebdc42602f3e7b858197f807d0a0ff6
Signed-off-by: default avatarPuneet Yatnal <puneet@codeaurora.org>
parent 83553255
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1219,6 +1219,7 @@ int st_asm330lhh_probe(struct device *dev, int irq,
	return 0;

regulator_shutdown:
	if (asm330_check_regulator)
		st_asm330lhh_regulator_power_down(hw);

	return err;