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

Commit 9ff743ae authored by Tony Lijo Jose's avatar Tony Lijo Jose Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: flash: Switch off flash on provider crash



Switch off the flash if the camera service crashes.

CRs-Fixed: 2599316
Change-Id: If01fb0312a8a7b085e1fc7acb2da32207f78d881
Signed-off-by: default avatarTony Lijo Jose <tjose@codeaurora.org>
parent bb4f87c1
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
 */

#include <linux/module.h>
@@ -1774,6 +1774,12 @@ void cam_flash_shutdown(struct cam_flash_ctrl *fctrl)
	if ((fctrl->flash_state == CAM_FLASH_STATE_CONFIG) ||
		(fctrl->flash_state == CAM_FLASH_STATE_START)) {
		fctrl->func_tbl.flush_req(fctrl, FLUSH_ALL, 0);
		rc = cam_flash_off(fctrl);
		if (rc) {
			CAM_ERR(CAM_FLASH,
					"LED OFF FAILED: %d",
					rc);
		}
		rc = fctrl->func_tbl.power_ops(fctrl, false);
		if (rc)
			CAM_ERR(CAM_FLASH, "Power Down Failed rc: %d",