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

Commit bc78bdbc authored by Peter Liu's avatar Peter Liu
Browse files

msm: camera: Fix long overflow on the pix clk



Using unsigned long to avoid overflow since
pix clk frequencies might cause long overflow.
Fix this by using unsigned long instead of long.

Change-Id: Iaf184de26d8ae689efa297096be9f01db84faded
Signed-off-by: default avatarPeter Liu <pingchie@codeaurora.org>
parent 6f1c4b95
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1057,8 +1057,8 @@ static int msm_isp_update_stream_bandwidth(struct vfe_device *vfe_dev)
	if (num_pix_streams > 0)
		total_pix_bandwidth = total_pix_bandwidth /
			num_pix_streams * (num_pix_streams - 1) +
			axi_data->src_info[VFE_PIX_0].pixel_clock *
			ISP_DEFAULT_FORMAT_FACTOR / ISP_Q2;
			((unsigned long)axi_data->src_info[VFE_PIX_0].
			pixel_clock) * ISP_DEFAULT_FORMAT_FACTOR / ISP_Q2;
	total_bandwidth = total_pix_bandwidth + total_rdi_bandwidth;

	rc = msm_isp_update_bandwidth(ISP_VFE0 + vfe_dev->pdev->id,