aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/rfbi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/omap2/dss/rfbi.c')
-rw-r--r--drivers/video/omap2/dss/rfbi.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/video/omap2/dss/rfbi.c b/drivers/video/omap2/dss/rfbi.c
index 1127037cb9d5..38d9b8ecbe3c 100644
--- a/drivers/video/omap2/dss/rfbi.c
+++ b/drivers/video/omap2/dss/rfbi.c
@@ -970,25 +970,34 @@ static struct omap_dss_device * __init rfbi_find_dssdev(struct platform_device *
970 return def_dssdev; 970 return def_dssdev;
971} 971}
972 972
973static void __init rfbi_probe_pdata(struct platform_device *pdev) 973static void __init rfbi_probe_pdata(struct platform_device *rfbidev)
974{ 974{
975 struct omap_dss_device *plat_dssdev;
975 struct omap_dss_device *dssdev; 976 struct omap_dss_device *dssdev;
976 int r; 977 int r;
977 978
978 dssdev = rfbi_find_dssdev(pdev); 979 plat_dssdev = rfbi_find_dssdev(rfbidev);
979 980
981 if (!plat_dssdev)
982 return;
983
984 dssdev = dss_alloc_and_init_device(&rfbidev->dev);
980 if (!dssdev) 985 if (!dssdev)
981 return; 986 return;
982 987
988 dss_copy_device_pdata(dssdev, plat_dssdev);
989
983 r = rfbi_init_display(dssdev); 990 r = rfbi_init_display(dssdev);
984 if (r) { 991 if (r) {
985 DSSERR("device %s init failed: %d\n", dssdev->name, r); 992 DSSERR("device %s init failed: %d\n", dssdev->name, r);
993 dss_put_device(dssdev);
986 return; 994 return;
987 } 995 }
988 996
989 r = omap_dss_register_device(dssdev, &pdev->dev); 997 r = dss_add_device(dssdev);
990 if (r) { 998 if (r) {
991 DSSERR("device %s register failed: %d\n", dssdev->name, r); 999 DSSERR("device %s register failed: %d\n", dssdev->name, r);
1000 dss_put_device(dssdev);
992 return; 1001 return;
993 } 1002 }
994} 1003}
@@ -1055,7 +1064,7 @@ err_runtime_get:
1055 1064
1056static int __exit omap_rfbihw_remove(struct platform_device *pdev) 1065static int __exit omap_rfbihw_remove(struct platform_device *pdev)
1057{ 1066{
1058 omap_dss_unregister_child_devices(&pdev->dev); 1067 dss_unregister_child_devices(&pdev->dev);
1059 pm_runtime_disable(&pdev->dev); 1068 pm_runtime_disable(&pdev->dev);
1060 return 0; 1069 return 0;
1061} 1070}