Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 371667
b: refs/heads/master
c: bcb734d
h: refs/heads/master
i:
  371665: 3f6cd5b
  371663: 86cdab7
v: v3
  • Loading branch information
Tomi Valkeinen committed May 2, 2013
1 parent c97a4eb commit d98c43f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b5a99c2626a4ace340a535775342e2a75fbe60e7
refs/heads/master: bcb734d2a1ef1b40fd7600b0f4f9225484572c67
22 changes: 15 additions & 7 deletions trunk/drivers/video/omap2/dss/dpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ static struct omap_dss_device *dpi_find_dssdev(struct platform_device *pdev)
return def_dssdev;
}

static void dpi_probe_pdata(struct platform_device *dpidev)
static int dpi_probe_pdata(struct platform_device *dpidev)
{
struct omap_dss_device *plat_dssdev;
struct omap_dss_device *dssdev;
Expand All @@ -644,36 +644,38 @@ static void dpi_probe_pdata(struct platform_device *dpidev)
plat_dssdev = dpi_find_dssdev(dpidev);

if (!plat_dssdev)
return;
return 0;

dssdev = dss_alloc_and_init_device(&dpidev->dev);
if (!dssdev)
return;
return -ENOMEM;

dss_copy_device_pdata(dssdev, plat_dssdev);

r = dpi_init_display(dssdev);
if (r) {
DSSERR("device %s init failed: %d\n", dssdev->name, r);
dss_put_device(dssdev);
return;
return r;
}

r = omapdss_output_set_device(&dpi.output, dssdev);
if (r) {
DSSERR("failed to connect output to new device: %s\n",
dssdev->name);
dss_put_device(dssdev);
return;
return r;
}

r = dss_add_device(dssdev);
if (r) {
DSSERR("device %s register failed: %d\n", dssdev->name, r);
omapdss_output_unset_device(&dpi.output);
dss_put_device(dssdev);
return;
return r;
}

return 0;
}

static void dpi_init_output(struct platform_device *pdev)
Expand All @@ -698,11 +700,17 @@ static void __exit dpi_uninit_output(struct platform_device *pdev)

static int omap_dpi_probe(struct platform_device *pdev)
{
int r;

mutex_init(&dpi.lock);

dpi_init_output(pdev);

dpi_probe_pdata(pdev);
r = dpi_probe_pdata(pdev);
if (r) {
dpi_uninit_output(pdev);
return r;
}

return 0;
}
Expand Down

0 comments on commit d98c43f

Please sign in to comment.