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

Commit 078dd57d authored by Camera Software Integration's avatar Camera Software Integration Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: sensor: fix 64-bit division for 32-bit kernel compilation"...

Merge "msm: camera: sensor: fix 64-bit division for 32-bit kernel compilation" into camera-kernel.lnx.4.0
parents 67373afb 56f616b4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@
#include "cam_res_mgr_api.h"
#include "cam_common_util.h"
#include "cam_packet_util.h"
#include <asm/div64.h>

static uint default_on_timer = 2;
module_param(default_on_timer, uint, 0644);
@@ -1558,8 +1559,7 @@ int cam_flash_pmic_pkt_parser(struct cam_flash_ctrl *fctrl, void *arg)
				add_req.trigger_eof = true;
				/* Active time for the preflash */
				flash_data->flash_active_time_ms =
				(flash_operation_info->time_on_duration_ns)
					/ 1000000;
				do_div(flash_operation_info->time_on_duration_ns, 1000000);
				CAM_DBG(CAM_FLASH,
					"PRECISE FLASH: active_time: %llu",
					flash_data->flash_active_time_ms);
+6 −6
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2019-2021, The Linux Foundation. All rights reserved.
 */

#include <linux/interconnect.h>
#include "cam_soc_bus.h"

#include <asm/div64.h>
/**
 * struct cam_soc_bus_client_data : Bus client data
 *
@@ -37,8 +37,8 @@ int cam_soc_bus_client_update_request(void *client, unsigned int idx)
	CAM_DBG(CAM_PERF, "Bus client=[%s] index[%d] ab[%llu] ib[%llu]",
		bus_client->common_data->name, idx, ab, ib);

	rc = icc_set_bw(bus_client_data->icc_data, Bps_to_icc(ab),
		Bps_to_icc(ib));
	rc = icc_set_bw(bus_client_data->icc_data, do_div(ab, 1000),
		do_div(ib, 1000));
	if (rc) {
		CAM_ERR(CAM_UTIL,
			"Update request failed, client[%s], idx: %d",
@@ -60,8 +60,8 @@ int cam_soc_bus_client_update_bw(void *client, uint64_t ab, uint64_t ib)

	CAM_DBG(CAM_PERF, "Bus client=[%s] :ab[%llu] ib[%llu]",
		bus_client->common_data->name, ab, ib);
	rc = icc_set_bw(bus_client_data->icc_data, Bps_to_icc(ab),
		Bps_to_icc(ib));
	rc = icc_set_bw(bus_client_data->icc_data, do_div(ab, 1000),
		do_div(ib, 1000));
	if (rc) {
		CAM_ERR(CAM_UTIL, "Update request failed, client[%s]",
			bus_client->common_data->name);