Commit c2ebca00 authored by Sakari Ailus's avatar Sakari Ailus Committed by Mauro Carvalho Chehab

[media] smiapp-pll: Correct type for min_t()

Unsigned.
Signed-off-by: default avatarSakari Ailus <sakari.ailus@iki.fi>
Acked-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent b351f866
...@@ -162,7 +162,7 @@ int smiapp_pll_calculate(struct device *dev, struct smiapp_pll_limits *limits, ...@@ -162,7 +162,7 @@ int smiapp_pll_calculate(struct device *dev, struct smiapp_pll_limits *limits,
more_mul_max); more_mul_max);
/* Don't go above max pll op frequency. */ /* Don't go above max pll op frequency. */
more_mul_max = more_mul_max =
min_t(int, min_t(uint32_t,
more_mul_max, more_mul_max,
limits->max_pll_op_freq_hz limits->max_pll_op_freq_hz
/ (pll->ext_clk_freq_hz / pll->pre_pll_clk_div * mul)); / (pll->ext_clk_freq_hz / pll->pre_pll_clk_div * mul));
...@@ -322,7 +322,7 @@ int smiapp_pll_calculate(struct device *dev, struct smiapp_pll_limits *limits, ...@@ -322,7 +322,7 @@ int smiapp_pll_calculate(struct device *dev, struct smiapp_pll_limits *limits,
for (sys_div = min_sys_div; for (sys_div = min_sys_div;
sys_div <= max_sys_div; sys_div <= max_sys_div;
sys_div += 2 - (sys_div & 1)) { sys_div += 2 - (sys_div & 1)) {
int pix_div = DIV_ROUND_UP(vt_div, sys_div); uint16_t pix_div = DIV_ROUND_UP(vt_div, sys_div);
if (pix_div < limits->min_vt_pix_clk_div if (pix_div < limits->min_vt_pix_clk_div
|| pix_div > limits->max_vt_pix_clk_div) { || pix_div > limits->max_vt_pix_clk_div) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment