[PATCH] drm/gma500: Make mdfld_dsi_connector_dpms() return a value

From: Daniel Wagner
Date: Thu Feb 18 2016 - 10:04:21 EST


9a69a9ac20f7 ("drm: Make the connector dpms callback
return a value, v2.") wants mdfld_dsi_connector_dpms to return
a value.

This fixes also a new gcc 5.2 warning:

drivers/gpu/drm/gma500/mdfld_dsi_output.c:407:39: warning: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.dpms = /*drm_helper_connector_dpms*/mdfld_dsi_connector_dpms,
^
Signed-off-by: Daniel Wagner <daniel.wagner@xxxxxxxxxxxx>
---
drivers/gpu/drm/gma500/mdfld_dsi_output.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/gma500/mdfld_dsi_output.c b/drivers/gpu/drm/gma500/mdfld_dsi_output.c
index d758f4c..407b9bb 100644
--- a/drivers/gpu/drm/gma500/mdfld_dsi_output.c
+++ b/drivers/gpu/drm/gma500/mdfld_dsi_output.c
@@ -382,14 +382,14 @@ static int mdfld_dsi_connector_mode_valid(struct drm_connector *connector,
return MODE_OK;
}

-static void mdfld_dsi_connector_dpms(struct drm_connector *connector, int mode)
+static int mdfld_dsi_connector_dpms(struct drm_connector *connector, int mode)
{
if (mode == connector->dpms)
- return;
+ return 0;

/*first, execute dpms*/

- drm_helper_connector_dpms(connector, mode);
+ return drm_helper_connector_dpms(connector, mode);
}

static struct drm_encoder *mdfld_dsi_connector_best_encoder(
@@ -404,7 +404,7 @@ static struct drm_encoder *mdfld_dsi_connector_best_encoder(

/*DSI connector funcs*/
static const struct drm_connector_funcs mdfld_dsi_connector_funcs = {
- .dpms = /*drm_helper_connector_dpms*/mdfld_dsi_connector_dpms,
+ .dpms = mdfld_dsi_connector_dpms,
.detect = mdfld_dsi_connector_detect,
.fill_modes = drm_helper_probe_single_connector_modes,
.set_property = mdfld_dsi_connector_set_property,
--
2.5.0