Commit d296089b authored by Changcheng Deng's avatar Changcheng Deng Committed by Jani Nikula

drm/i915/dsi: use min_t() to make code cleaner

Use min_t() in order to make code cleaner.
Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarChangcheng Deng <deng.changcheng@zte.com.cn>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220308091655.2078825-1-deng.changcheng@zte.com.cn
parent 17e571fe
...@@ -394,10 +394,7 @@ static void glk_dsi_program_esc_clock(struct drm_device *dev, ...@@ -394,10 +394,7 @@ static void glk_dsi_program_esc_clock(struct drm_device *dev,
/* Calculate TXESC2 divider */ /* Calculate TXESC2 divider */
div2_value = DIV_ROUND_UP(div1_value, txesc1_div); div2_value = DIV_ROUND_UP(div1_value, txesc1_div);
if (div2_value < 10) txesc2_div = min_t(u32, div2_value, 10);
txesc2_div = div2_value;
else
txesc2_div = 10;
intel_de_write(dev_priv, MIPIO_TXESC_CLK_DIV1, intel_de_write(dev_priv, MIPIO_TXESC_CLK_DIV1,
(1 << (txesc1_div - 1)) & GLK_TX_ESC_CLK_DIV1_MASK); (1 << (txesc1_div - 1)) & GLK_TX_ESC_CLK_DIV1_MASK);
......
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