From: Philipp Zabel Date: Mon, 7 Apr 2014 08:22:36 +0000 (+0200) Subject: imx-drm: imx-drm-core: Fix imx_drm_encoder_get_mux_id X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=60d857bffcac67c77a33c06d8dfe405f3a293d2b;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git imx-drm: imx-drm-core: Fix imx_drm_encoder_get_mux_id The decoder mux id is equal to the port id of the encoder's input port that is connected to the given crtc, not to the endpoint id (which is arbitrary and usually zero). Signed-off-by: Philipp Zabel Tested-by: Shawn Guo Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/imx-drm/imx-drm-core.c b/drivers/staging/imx-drm/imx-drm-core.c index 4144a75e5f71..bc7f8bd227c7 100644 --- a/drivers/staging/imx-drm/imx-drm-core.c +++ b/drivers/staging/imx-drm/imx-drm-core.c @@ -517,7 +517,7 @@ int imx_drm_encoder_get_mux_id(struct device_node *node, of_node_put(port); if (port == imx_crtc->port) { ret = of_graph_parse_endpoint(ep, &endpoint); - return ret ? ret : endpoint.id; + return ret ? ret : endpoint.port; } } while (ep);