Commit 71dfb744 authored by Carlos Palminha's avatar Carlos Palminha Committed by Daniel Vetter

drm: fixes when i2c encoder slave mode_fixup is null.

Avoid i2c slave encoder drivers to copy/paste code to implement functions that will
only return true.
Signed-off-by: default avatarCarlos Palminha <palminha@synopsys.com>
[danvet: whitespace requested by Jani.]
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1455106118-32145-1-git-send-email-palminha@synopsys.com
parent 52dfa12e
......@@ -140,6 +140,9 @@ bool drm_i2c_encoder_mode_fixup(struct drm_encoder *encoder,
const struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
{
if (!get_slave_funcs(encoder)->mode_fixup)
return true;
return get_slave_funcs(encoder)->mode_fixup(encoder, mode, adjusted_mode);
}
EXPORT_SYMBOL(drm_i2c_encoder_mode_fixup);
......
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