struct omap_dss_device *in;
int r;
- dev_dbg(ddata->dev, "connect\n");
-
- if (omapdss_device_is_connected(dssdev))
- return 0;
-
in = omapdss_of_find_source_for_first_ep(ddata->dev->of_node);
if (IS_ERR(in)) {
dev_err(ddata->dev, "failed to find video source\n");
struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in;
- dev_dbg(ddata->dev, "disconnect\n");
-
- if (!omapdss_device_is_connected(dssdev))
- return;
-
omapdss_device_disconnect(in, dssdev);
omap_dss_put_device(in);
struct omap_dss_device *in;
int r;
- if (omapdss_device_is_connected(dssdev))
- return 0;
-
in = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
if (IS_ERR(in)) {
dev_err(dssdev->dev, "failed to find video source\n");
struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in;
- if (!omapdss_device_is_connected(dssdev))
- return;
-
omapdss_device_disconnect(in, dssdev);
omap_dss_put_device(in);
struct omap_dss_device *in;
int r;
- dev_dbg(ddata->dev, "connect\n");
-
- if (omapdss_device_is_connected(dssdev))
- return 0;
-
in = omapdss_of_find_source_for_first_ep(ddata->dev->of_node);
if (IS_ERR(in)) {
dev_err(ddata->dev, "failed to find video source\n");
struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in;
- dev_dbg(ddata->dev, "disconnect\n");
-
- if (!omapdss_device_is_connected(dssdev))
- return;
-
omapdss_device_disconnect(in, dssdev);
omap_dss_put_device(in);
struct omap_dss_device *in;
int r;
- dev_dbg(dssdev->dev, "connect\n");
-
- if (omapdss_device_is_connected(dssdev))
- return -EBUSY;
-
in = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
if (IS_ERR(in)) {
dev_err(dssdev->dev, "failed to find video source\n");
struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in;
- dev_dbg(dssdev->dev, "disconnect\n");
-
- WARN_ON(!omapdss_device_is_connected(dssdev));
- if (!omapdss_device_is_connected(dssdev))
- return;
-
WARN_ON(dst != dssdev->dst);
if (dst != dssdev->dst)
return;
struct omap_dss_device *in;
int r;
- if (omapdss_device_is_connected(dssdev))
- return -EBUSY;
-
in = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
if (IS_ERR(in)) {
dev_err(dssdev->dev, "failed to find video source\n");
struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in;
- WARN_ON(!omapdss_device_is_connected(dssdev));
- if (!omapdss_device_is_connected(dssdev))
- return;
-
WARN_ON(dst != dssdev->dst);
if (dst != dssdev->dst)
return;
struct omap_dss_device *in;
int r;
- if (omapdss_device_is_connected(dssdev))
- return 0;
-
in = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
if (IS_ERR(in)) {
dev_err(dssdev->dev, "failed to find video source\n");
struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in;
- if (!omapdss_device_is_connected(dssdev))
- return;
-
omapdss_device_disconnect(in, dssdev);
omap_dss_put_device(in);
struct omap_dss_device *in;
int r;
- if (omapdss_device_is_connected(dssdev))
- return 0;
-
in = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
if (IS_ERR(in)) {
dev_err(dssdev->dev, "failed to find video source\n");
struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in;
- if (!omapdss_device_is_connected(dssdev))
- return;
-
in->ops->dsi.release_vc(in, ddata->channel);
omapdss_device_disconnect(in, dssdev);
struct omap_dss_device *in;
int r;
- if (omapdss_device_is_connected(dssdev))
- return 0;
-
in = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
if (IS_ERR(in)) {
dev_err(dssdev->dev, "failed to find video source\n");
struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in;
- if (!omapdss_device_is_connected(dssdev))
- return;
-
omapdss_device_disconnect(in, dssdev);
omap_dss_put_device(in);
struct omap_dss_device *in;
int r;
- if (omapdss_device_is_connected(dssdev))
- return 0;
-
in = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
if (IS_ERR(in)) {
dev_err(dssdev->dev, "failed to find video source\n");
struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in;
- if (!omapdss_device_is_connected(dssdev))
- return;
-
omapdss_device_disconnect(in, dssdev);
omap_dss_put_device(in);
struct omap_dss_device *in;
int r;
- if (omapdss_device_is_connected(dssdev))
- return 0;
-
in = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
if (IS_ERR(in)) {
dev_err(dssdev->dev, "failed to find video source\n");
struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in;
- if (!omapdss_device_is_connected(dssdev))
- return;
-
omapdss_device_disconnect(in, dssdev);
omap_dss_put_device(in);
struct omap_dss_device *in;
int r;
- if (omapdss_device_is_connected(dssdev))
- return 0;
-
in = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
if (IS_ERR(in)) {
dev_err(dssdev->dev, "failed to find video source\n");
struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in;
- if (!omapdss_device_is_connected(dssdev))
- return;
-
omapdss_device_disconnect(in, dssdev);
omap_dss_put_device(in);
struct omap_dss_device *in;
int r;
- if (omapdss_device_is_connected(dssdev))
- return 0;
-
in = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
if (IS_ERR(in)) {
dev_err(dssdev->dev, "failed to find video source\n");
struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in;
- if (!omapdss_device_is_connected(dssdev))
- return;
-
omapdss_device_disconnect(in, dssdev);
omap_dss_put_device(in);
struct omap_dss_device *in;
int r;
- if (omapdss_device_is_connected(dssdev))
- return 0;
-
in = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
if (IS_ERR(in)) {
dev_err(dssdev->dev, "failed to find video source\n");
struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in;
- if (!omapdss_device_is_connected(dssdev))
- return;
-
omapdss_device_disconnect(in, dssdev);
omap_dss_put_device(in);
int omapdss_device_connect(struct omap_dss_device *src,
struct omap_dss_device *dst)
{
+ dev_dbg(src->dev, "connect\n");
+
+ if (omapdss_device_is_connected(src))
+ return -EBUSY;
+
if (src->driver)
return src->driver->connect(src);
else
void omapdss_device_disconnect(struct omap_dss_device *src,
struct omap_dss_device *dst)
{
+ dev_dbg(src->dev, "disconnect\n");
+
+ if (!src->id && !omapdss_device_is_connected(src)) {
+ WARN_ON(!src->driver);
+ return;
+ }
+
if (src->driver)
src->driver->disconnect(src);
else