diff options
Diffstat (limited to 'drivers/video/omap2/dss/dpi.c')
-rw-r--r-- | drivers/video/omap2/dss/dpi.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c index 6f9a199a68a2..fac19d39ab18 100644 --- a/drivers/video/omap2/dss/dpi.c +++ b/drivers/video/omap2/dss/dpi.c | |||
@@ -399,25 +399,34 @@ static struct omap_dss_device * __init dpi_find_dssdev(struct platform_device *p | |||
399 | return def_dssdev; | 399 | return def_dssdev; |
400 | } | 400 | } |
401 | 401 | ||
402 | static void __init dpi_probe_pdata(struct platform_device *pdev) | 402 | static void __init dpi_probe_pdata(struct platform_device *dpidev) |
403 | { | 403 | { |
404 | struct omap_dss_device *plat_dssdev; | ||
404 | struct omap_dss_device *dssdev; | 405 | struct omap_dss_device *dssdev; |
405 | int r; | 406 | int r; |
406 | 407 | ||
407 | dssdev = dpi_find_dssdev(pdev); | 408 | plat_dssdev = dpi_find_dssdev(dpidev); |
408 | 409 | ||
410 | if (!plat_dssdev) | ||
411 | return; | ||
412 | |||
413 | dssdev = dss_alloc_and_init_device(&dpidev->dev); | ||
409 | if (!dssdev) | 414 | if (!dssdev) |
410 | return; | 415 | return; |
411 | 416 | ||
417 | dss_copy_device_pdata(dssdev, plat_dssdev); | ||
418 | |||
412 | r = dpi_init_display(dssdev); | 419 | r = dpi_init_display(dssdev); |
413 | if (r) { | 420 | if (r) { |
414 | DSSERR("device %s init failed: %d\n", dssdev->name, r); | 421 | DSSERR("device %s init failed: %d\n", dssdev->name, r); |
422 | dss_put_device(dssdev); | ||
415 | return; | 423 | return; |
416 | } | 424 | } |
417 | 425 | ||
418 | r = omap_dss_register_device(dssdev, &pdev->dev); | 426 | r = dss_add_device(dssdev); |
419 | if (r) { | 427 | if (r) { |
420 | DSSERR("device %s register failed: %d\n", dssdev->name, r); | 428 | DSSERR("device %s register failed: %d\n", dssdev->name, r); |
429 | dss_put_device(dssdev); | ||
421 | return; | 430 | return; |
422 | } | 431 | } |
423 | } | 432 | } |
@@ -433,7 +442,7 @@ static int __init omap_dpi_probe(struct platform_device *pdev) | |||
433 | 442 | ||
434 | static int __exit omap_dpi_remove(struct platform_device *pdev) | 443 | static int __exit omap_dpi_remove(struct platform_device *pdev) |
435 | { | 444 | { |
436 | omap_dss_unregister_child_devices(&pdev->dev); | 445 | dss_unregister_child_devices(&pdev->dev); |
437 | 446 | ||
438 | return 0; | 447 | return 0; |
439 | } | 448 | } |