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

Commit f160f0d4 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "input: qpnp-power-on: Fix ship-mode enable logic"

parents 7764f1a9 28d01348
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
 */

#include <linux/debugfs.h>
@@ -682,6 +682,8 @@ int qpnp_pon_system_pwr_off(enum pon_power_off_type type)
		}
	}

out:
	spin_unlock_irqrestore(&spon_list_slock, flags);
	/* Set ship mode here if it has been requested */
	if (!!pon_ship_mode_en) {
		batt_psy = power_supply_get_by_name("battery");
@@ -694,8 +696,6 @@ int qpnp_pon_system_pwr_off(enum pon_power_off_type type)
				dev_err(sys_reset_dev->dev, "Failed to set ship mode\n");
		}
	}
out:
	spin_unlock_irqrestore(&spon_list_slock, flags);

	return rc;
}