Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 371670
b: refs/heads/master
c: f60a32f
h: refs/heads/master
v: v3
  • Loading branch information
Tomi Valkeinen committed May 2, 2013
1 parent f1e6b2a commit 79fac19
Show file tree
Hide file tree
Showing 2 changed files with 15 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: d1890a680e439e1b284faca6e8eaa330c599f99f
refs/heads/master: f60a32fd9e3461dc33d44cca74db18fa09a0fa47
21 changes: 14 additions & 7 deletions trunk/drivers/video/omap2/dss/rfbi.c
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,7 @@ static struct omap_dss_device *rfbi_find_dssdev(struct platform_device *pdev)
return def_dssdev;
}

static void rfbi_probe_pdata(struct platform_device *rfbidev)
static int rfbi_probe_pdata(struct platform_device *rfbidev)
{
struct omap_dss_device *plat_dssdev;
struct omap_dss_device *dssdev;
Expand All @@ -986,36 +986,38 @@ static void rfbi_probe_pdata(struct platform_device *rfbidev)
plat_dssdev = rfbi_find_dssdev(rfbidev);

if (!plat_dssdev)
return;
return 0;

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

dss_copy_device_pdata(dssdev, plat_dssdev);

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

return 0;
}

static void rfbi_init_output(struct platform_device *pdev)
Expand Down Expand Up @@ -1091,7 +1093,12 @@ static int omap_rfbihw_probe(struct platform_device *pdev)

rfbi_init_output(pdev);

rfbi_probe_pdata(pdev);
r = rfbi_probe_pdata(pdev);
if (r) {
rfbi_uninit_output(pdev);
pm_runtime_disable(&pdev->dev);
return r;
}

return 0;

Expand Down

0 comments on commit 79fac19

Please sign in to comment.