|
@@ -620,24 +620,13 @@ static int dpi_connect(struct omap_dss_device *src,
|
|
|
if (r)
|
|
|
return r;
|
|
|
|
|
|
- r = omapdss_output_set_device(dst, dst->next);
|
|
|
+ r = omapdss_device_connect(dst->dss, dst, dst->next);
|
|
|
if (r) {
|
|
|
- DSSERR("failed to connect output to new device: %s\n",
|
|
|
- dst->name);
|
|
|
- goto err_mgr_disconnect;
|
|
|
+ dss_mgr_disconnect(dst);
|
|
|
+ return r;
|
|
|
}
|
|
|
|
|
|
- r = omapdss_device_connect(dst->dss, dst, dst->next);
|
|
|
- if (r)
|
|
|
- goto err_output_unset;
|
|
|
-
|
|
|
return 0;
|
|
|
-
|
|
|
-err_output_unset:
|
|
|
- omapdss_output_unset_device(dst);
|
|
|
-err_mgr_disconnect:
|
|
|
- dss_mgr_disconnect(dst);
|
|
|
- return r;
|
|
|
}
|
|
|
|
|
|
static void dpi_disconnect(struct omap_dss_device *src,
|
|
@@ -664,6 +653,7 @@ static int dpi_init_output_port(struct dpi_data *dpi, struct device_node *port)
|
|
|
{
|
|
|
struct omap_dss_device *out = &dpi->output;
|
|
|
u32 port_num = 0;
|
|
|
+ int r;
|
|
|
|
|
|
of_property_read_u32(port, "reg", &port_num);
|
|
|
dpi->id = port_num <= 2 ? port_num : 0;
|
|
@@ -696,6 +686,13 @@ static int dpi_init_output_port(struct dpi_data *dpi, struct device_node *port)
|
|
|
return PTR_ERR(out->next);
|
|
|
}
|
|
|
|
|
|
+ r = omapdss_output_validate(out);
|
|
|
+ if (r) {
|
|
|
+ omapdss_device_put(out->next);
|
|
|
+ out->next = NULL;
|
|
|
+ return r;
|
|
|
+ }
|
|
|
+
|
|
|
omapdss_device_register(out);
|
|
|
|
|
|
return 0;
|