Hi, this patch factors out the mostly identical imx_drm_encoder_get_mux_id and rockchip_drm_encoder_get_mux_id functions into a common helper to parse the active endpoint and two inline functions to return its id or port id. These patches depend on the "drm: use for_each_endpoint_of_node macro" series posted here: http://lists.freedesktop.org/archives/dri-devel/2015-February/077992.html which in turn depends on the "Add of-graph helpers to loop over endpoints and find ports by id" series: https://lkml.org/lkml/2015/2/23/115 regards Philipp Philipp Zabel (3): drm: add drm_of_encoder_active_endpoint helpers drm/imx: remove imx_drm_encoder_get_mux_id drm/rockchip: remove rockchip_drm_encoder_get_mux_id drivers/gpu/drm/drm_of.c | 34 +++++++++++++++++++++++++++++ drivers/gpu/drm/imx/dw_hdmi-imx.c | 2 +- drivers/gpu/drm/imx/imx-drm-core.c | 30 ------------------------- drivers/gpu/drm/imx/imx-drm.h | 2 -- drivers/gpu/drm/imx/imx-ldb.c | 5 +++-- drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 2 +- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 30 ------------------------- drivers/gpu/drm/rockchip/rockchip_drm_drv.h | 2 -- include/drm/drm_of.h | 32 +++++++++++++++++++++++++++ 9 files changed, 71 insertions(+), 68 deletions(-) -- 2.1.4 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel