From deb0914ed40c4149d42454f2fbe4bf14b2dc4eb8 Mon Sep 17 00:00:00 2001 From: Alok Chauhan Date: Tue, 28 Dec 2021 11:46:46 +0530 Subject: [PATCH] msm: camera: ope: Fix for 32-bit kernel Use div_u64 to do 64-bit division. CRs-Fixed: 3099898 Change-Id: I405461ea02d0ec668cb7be764543a9a16bd1c3e6 Signed-off-by: Alok Chauhan Signed-off-by: Nirmal Abraham --- drivers/cam_ope/ope_hw_mgr/cam_ope_hw_mgr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/cam_ope/ope_hw_mgr/cam_ope_hw_mgr.c b/drivers/cam_ope/ope_hw_mgr/cam_ope_hw_mgr.c index 6057ec7b5cc1..b76f97a7461c 100644 --- a/drivers/cam_ope/ope_hw_mgr/cam_ope_hw_mgr.c +++ b/drivers/cam_ope/ope_hw_mgr/cam_ope_hw_mgr.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2017-2021, The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2022, The Linux Foundation. All rights reserved. */ #include @@ -19,6 +19,7 @@ #include #include #include +#include #include "cam_sync_api.h" #include "cam_packet_util.h" @@ -625,7 +626,7 @@ static bool cam_ope_check_req_delay(struct cam_ope_ctx *ctx_data, if (ts_ns - req_time < ((ctx_data->req_timer_timeout - - ctx_data->req_timer_timeout / 10) * 1000000)) { + div_u64(ctx_data->req_timer_timeout, 10)) * 1000000)) { CAM_INFO(CAM_OPE, "ctx: %d, ts_ns : %llu", ctx_data->ctx_id, ts_ns); cam_ope_req_timer_reset(ctx_data);