OMAPDSS: rename omap_dss_device's 'device' field to 'dst'

In the old panel device model we had omap_dss_output entities,
representing the encoders in the DSS block. This entity had "device"
field, which pointed to the panel that was using the omap_dss_output.

With the new panel device model, the omap_dss_output is integrated into
omap_dss_device, which now represents a "display entity". Thus the "device"
field, now in omap_dss_device, points to the next entity in the display
entity-chain.

This patch renames the "device" field to "dst", which much better tells
what the field points to.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Archit Taneja <archit@ti.com>
This commit is contained in:
Tomi Valkeinen 2013-07-24 13:06:54 +03:00
parent a73fdc6474
commit 9560dc1059
10 changed files with 31 additions and 31 deletions

View file

@ -44,7 +44,7 @@ static int tfp410_connect(struct omap_dss_device *dssdev,
return r; return r;
dst->src = dssdev; dst->src = dssdev;
dssdev->device = dst; dssdev->dst = dst;
return 0; return 0;
} }
@ -59,12 +59,12 @@ static void tfp410_disconnect(struct omap_dss_device *dssdev,
if (!omapdss_device_is_connected(dssdev)) if (!omapdss_device_is_connected(dssdev))
return; return;
WARN_ON(dst != dssdev->device); WARN_ON(dst != dssdev->dst);
if (dst != dssdev->device) if (dst != dssdev->dst)
return; return;
dst->src = NULL; dst->src = NULL;
dssdev->device = NULL; dssdev->dst = NULL;
in->ops.dpi->disconnect(in, &ddata->dssdev); in->ops.dpi->disconnect(in, &ddata->dssdev);
} }
@ -244,7 +244,7 @@ static int __exit tfp410_remove(struct platform_device *pdev)
WARN_ON(omapdss_device_is_connected(dssdev)); WARN_ON(omapdss_device_is_connected(dssdev));
if (omapdss_device_is_connected(dssdev)) if (omapdss_device_is_connected(dssdev))
tfp410_disconnect(dssdev, dssdev->device); tfp410_disconnect(dssdev, dssdev->dst);
omap_dss_put_device(in); omap_dss_put_device(in);

View file

@ -67,7 +67,7 @@ static int tpd_connect(struct omap_dss_device *dssdev,
return r; return r;
dst->src = dssdev; dst->src = dssdev;
dssdev->device = dst; dssdev->dst = dst;
INIT_COMPLETION(ddata->hpd_completion); INIT_COMPLETION(ddata->hpd_completion);
@ -95,15 +95,15 @@ static void tpd_disconnect(struct omap_dss_device *dssdev,
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in; struct omap_dss_device *in = ddata->in;
WARN_ON(dst != dssdev->device); WARN_ON(dst != dssdev->dst);
if (dst != dssdev->device) if (dst != dssdev->dst)
return; return;
gpio_set_value_cansleep(ddata->ct_cp_hpd_gpio, 0); gpio_set_value_cansleep(ddata->ct_cp_hpd_gpio, 0);
dst->src = NULL; dst->src = NULL;
dssdev->device = NULL; dssdev->dst = NULL;
in->ops.hdmi->disconnect(in, &ddata->dssdev); in->ops.hdmi->disconnect(in, &ddata->dssdev);
} }
@ -372,7 +372,7 @@ static int __exit tpd_remove(struct platform_device *pdev)
WARN_ON(omapdss_device_is_connected(dssdev)); WARN_ON(omapdss_device_is_connected(dssdev));
if (omapdss_device_is_connected(dssdev)) if (omapdss_device_is_connected(dssdev))
tpd_disconnect(dssdev, dssdev->device); tpd_disconnect(dssdev, dssdev->dst);
omap_dss_put_device(in); omap_dss_put_device(in);

View file

@ -428,8 +428,8 @@ static struct omap_dss_device *dss_mgr_get_device(struct omap_overlay_manager *m
if (dssdev == NULL) if (dssdev == NULL)
return NULL; return NULL;
while (dssdev->device) while (dssdev->dst)
dssdev = dssdev->device; dssdev = dssdev->dst;
if (dssdev->driver) if (dssdev->driver)
return dssdev; return dssdev;

View file

@ -643,9 +643,9 @@ static int dpi_connect(struct omap_dss_device *dssdev,
static void dpi_disconnect(struct omap_dss_device *dssdev, static void dpi_disconnect(struct omap_dss_device *dssdev,
struct omap_dss_device *dst) struct omap_dss_device *dst)
{ {
WARN_ON(dst != dssdev->device); WARN_ON(dst != dssdev->dst);
if (dst != dssdev->device) if (dst != dssdev->dst)
return; return;
omapdss_output_unset_device(dssdev); omapdss_output_unset_device(dssdev);

View file

@ -5264,9 +5264,9 @@ static int dsi_connect(struct omap_dss_device *dssdev,
static void dsi_disconnect(struct omap_dss_device *dssdev, static void dsi_disconnect(struct omap_dss_device *dssdev,
struct omap_dss_device *dst) struct omap_dss_device *dst)
{ {
WARN_ON(dst != dssdev->device); WARN_ON(dst != dssdev->dst);
if (dst != dssdev->device) if (dst != dssdev->dst)
return; return;
omapdss_output_unset_device(dssdev); omapdss_output_unset_device(dssdev);

View file

@ -900,9 +900,9 @@ static int hdmi_connect(struct omap_dss_device *dssdev,
static void hdmi_disconnect(struct omap_dss_device *dssdev, static void hdmi_disconnect(struct omap_dss_device *dssdev,
struct omap_dss_device *dst) struct omap_dss_device *dst)
{ {
WARN_ON(dst != dssdev->device); WARN_ON(dst != dssdev->dst);
if (dst != dssdev->device) if (dst != dssdev->dst)
return; return;
omapdss_output_unset_device(dssdev); omapdss_output_unset_device(dssdev);

View file

@ -34,9 +34,9 @@ int omapdss_output_set_device(struct omap_dss_device *out,
mutex_lock(&output_lock); mutex_lock(&output_lock);
if (out->device) { if (out->dst) {
DSSERR("output already has device %s connected to it\n", DSSERR("output already has device %s connected to it\n",
out->device->name); out->dst->name);
r = -EINVAL; r = -EINVAL;
goto err; goto err;
} }
@ -47,7 +47,7 @@ int omapdss_output_set_device(struct omap_dss_device *out,
goto err; goto err;
} }
out->device = dssdev; out->dst = dssdev;
dssdev->src = out; dssdev->src = out;
mutex_unlock(&output_lock); mutex_unlock(&output_lock);
@ -66,21 +66,21 @@ int omapdss_output_unset_device(struct omap_dss_device *out)
mutex_lock(&output_lock); mutex_lock(&output_lock);
if (!out->device) { if (!out->dst) {
DSSERR("output doesn't have a device connected to it\n"); DSSERR("output doesn't have a device connected to it\n");
r = -EINVAL; r = -EINVAL;
goto err; goto err;
} }
if (out->device->state != OMAP_DSS_DISPLAY_DISABLED) { if (out->dst->state != OMAP_DSS_DISPLAY_DISABLED) {
DSSERR("device %s is not disabled, cannot unset device\n", DSSERR("device %s is not disabled, cannot unset device\n",
out->device->name); out->dst->name);
r = -EINVAL; r = -EINVAL;
goto err; goto err;
} }
out->device->src = NULL; out->dst->src = NULL;
out->device = NULL; out->dst = NULL;
mutex_unlock(&output_lock); mutex_unlock(&output_lock);

View file

@ -306,9 +306,9 @@ static int sdi_connect(struct omap_dss_device *dssdev,
static void sdi_disconnect(struct omap_dss_device *dssdev, static void sdi_disconnect(struct omap_dss_device *dssdev,
struct omap_dss_device *dst) struct omap_dss_device *dst)
{ {
WARN_ON(dst != dssdev->device); WARN_ON(dst != dssdev->dst);
if (dst != dssdev->device) if (dst != dssdev->dst)
return; return;
omapdss_output_unset_device(dssdev); omapdss_output_unset_device(dssdev);

View file

@ -753,9 +753,9 @@ static int venc_connect(struct omap_dss_device *dssdev,
static void venc_disconnect(struct omap_dss_device *dssdev, static void venc_disconnect(struct omap_dss_device *dssdev,
struct omap_dss_device *dst) struct omap_dss_device *dst)
{ {
WARN_ON(dst != dssdev->device); WARN_ON(dst != dssdev->dst);
if (dst != dssdev->device) if (dst != dssdev->dst)
return; return;
omapdss_output_unset_device(dssdev); omapdss_output_unset_device(dssdev);

View file

@ -793,7 +793,7 @@ struct omap_dss_device {
/* dynamic fields */ /* dynamic fields */
struct omap_overlay_manager *manager; struct omap_overlay_manager *manager;
struct omap_dss_device *device; struct omap_dss_device *dst;
}; };
struct omap_dss_hdmi_data struct omap_dss_hdmi_data