@@ -192,6 +192,16 @@ static int imx_pd_register(struct drm_device *drm,
DRM_MODE_CONNECTOR_DPI);
}
+ return 0;
+}
+static int imx_pd_attach(struct drm_device *drm,
+ struct imx_parallel_display *imxpd,
+ struct imx_parallel_connector *imxpc)
+{
+ struct drm_encoder *encoder = &imxpd->encoder;
+ int ret;
+
+
if (imxpd->panel)
drm_panel_attach(imxpd->panel, &imxpc->connector);
@@ -261,7 +271,7 @@ static int imx_pd_bind(struct device *dev, struct device *master, void *data)
if (ret)
return ret;
- return 0;
+ return imx_pd_attach(drm, imxpd, imxpc);
}
static const struct component_ops imx_pd_ops = {
Split the maybe failing attach function from imx_pd_register() so we can construct simple error paths later on. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> --- drivers/gpu/drm/imx/parallel-display.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)