diff options
author | Carlos Palminha <CARLOS.PALMINHA@synopsys.com> | 2016-02-10 12:08:38 +0000 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-02-10 15:14:49 +0100 |
commit | 71dfb744bd9e11e765036f8096d7c2c6c19d2b0f (patch) | |
tree | ffab2954f796253559e444a1b6b5a2fac3724cb4 /drivers/gpu/drm/drm_encoder_slave.c | |
parent | 52dfa12e45510fce566fb240135420d7a0b5d0e6 (diff) | |
download | op-kernel-dev-71dfb744bd9e11e765036f8096d7c2c6c19d2b0f.zip op-kernel-dev-71dfb744bd9e11e765036f8096d7c2c6c19d2b0f.tar.gz |
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: Carlos Palminha <palminha@synopsys.com>
[danvet: whitespace requested by Jani.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1455106118-32145-1-git-send-email-palminha@synopsys.com
Diffstat (limited to 'drivers/gpu/drm/drm_encoder_slave.c')
-rw-r--r-- | drivers/gpu/drm/drm_encoder_slave.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_encoder_slave.c b/drivers/gpu/drm/drm_encoder_slave.c index e862907..4484785 100644 --- a/drivers/gpu/drm/drm_encoder_slave.c +++ b/drivers/gpu/drm/drm_encoder_slave.c @@ -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); |