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

Commit 3a702fce authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: sensor: Round the clock rate before setting"

parents 913bc12d afbd5633
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -147,13 +147,21 @@ int msm_cam_clk_enable(struct device *dev, struct msm_cam_clk_info *clk_info,
				goto cam_clk_get_err;
			}
			if (clk_info[i].clk_rate > 0) {
				rc = clk_set_rate(clk_ptr[i],
				clk_rate = clk_round_rate(clk_ptr[i],
					clk_info[i].clk_rate);
				if (clk_rate < 0) {
					pr_err("%s round failed\n",
						   clk_info[i].clk_name);
					goto cam_clk_set_err;
				}
				rc = clk_set_rate(clk_ptr[i],
					clk_rate);
				if (rc < 0) {
					pr_err("%s set failed\n",
						clk_info[i].clk_name);
					goto cam_clk_set_err;
				}

			} else if (clk_info[i].clk_rate == INIT_RATE) {
				clk_rate = clk_get_rate(clk_ptr[i]);
				if (clk_rate == 0) {