Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 371672
b: refs/heads/master
c: 6aa66f5
h: refs/heads/master
v: v3
  • Loading branch information
Tomi Valkeinen committed May 2, 2013
1 parent 7c87a91 commit 9b7f790
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: c0980297ff8f8184778258a7f544525e483fbd85
refs/heads/master: 6aa66f5c01f1f0063b14bd529b24723fb8e58075
22 changes: 15 additions & 7 deletions trunk/drivers/video/omap2/dss/venc.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ static struct omap_dss_device *venc_find_dssdev(struct platform_device *pdev)
return def_dssdev;
}

static void venc_probe_pdata(struct platform_device *vencdev)
static int venc_probe_pdata(struct platform_device *vencdev)
{
struct omap_dss_device *plat_dssdev;
struct omap_dss_device *dssdev;
Expand All @@ -763,36 +763,38 @@ static void venc_probe_pdata(struct platform_device *vencdev)
plat_dssdev = venc_find_dssdev(vencdev);

if (!plat_dssdev)
return;
return 0;

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

dss_copy_device_pdata(dssdev, plat_dssdev);

r = venc_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(&venc.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(&venc.output);
dss_put_device(dssdev);
return;
return r;
}

return 0;
}

static void venc_init_output(struct platform_device *pdev)
Expand Down Expand Up @@ -864,7 +866,13 @@ static int omap_venchw_probe(struct platform_device *pdev)

venc_init_output(pdev);

venc_probe_pdata(pdev);
r = venc_probe_pdata(pdev);
if (r) {
venc_panel_exit();
venc_uninit_output(pdev);
pm_runtime_disable(&pdev->dev);
return r;
}

return 0;

Expand Down

0 comments on commit 9b7f790

Please sign in to comment.