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

Commit 0ef6e093 authored by Rama Krishna Phani A's avatar Rama Krishna Phani A
Browse files

thermal: tsens: Update variable type



From the logic implemented, there is a chance that sensor_hw_num
can get a negative value. Update type of sensor_hw_num such that
it can hold both positive and negative values.

Change-Id: Ib05aedea90bc5797140728b6e64f15e5c11f9b25
Signed-off-by: default avatarRama Krishna Phani A <rphani@codeaurora.org>
parent 85108283
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -1393,7 +1393,8 @@ static int msm_tsens_get_temp(int sensor_client_id, unsigned long *temp)
	bool last_temp_valid = false, last_temp2_valid = false;
	bool last_temp3_valid = false;
	struct tsens_tm_device *tmdev = NULL;
	uint32_t sensor_hw_num = 0, idx = 0;
	uint32_t idx = 0;
	int sensor_hw_num = 0;
	unsigned long flags;

	tmdev = get_tsens_controller_for_client_id(sensor_client_id);