diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-04-26 06:47:06 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-05-02 05:24:00 -0400 |
commit | ee4a24e2fdfa6dd141cf4a02f8112935e361396b (patch) | |
tree | 2ef303a4e8b6e2f928a0b0df9331c7b2dccddefa | |
parent | d23b3357a3beab8ab0f3248f8b4b04dee1fb142b (diff) |
OMAPDSS: DSI: use platform_driver_register()
Use platform_driver_register() instead of platform_driver_probe() so
that we can support EPROBE_DEFER.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r-- | drivers/video/omap2/dss/dsi.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index 9b1c5ecee115..55fc0d48b5ed 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c | |||
@@ -5225,7 +5225,7 @@ static enum omap_channel dsi_get_channel(int module_id) | |||
5225 | } | 5225 | } |
5226 | } | 5226 | } |
5227 | 5227 | ||
5228 | static int __init dsi_init_display(struct omap_dss_device *dssdev) | 5228 | static int dsi_init_display(struct omap_dss_device *dssdev) |
5229 | { | 5229 | { |
5230 | struct platform_device *dsidev = | 5230 | struct platform_device *dsidev = |
5231 | dsi_get_dsidev_from_id(dssdev->phy.dsi.module); | 5231 | dsi_get_dsidev_from_id(dssdev->phy.dsi.module); |
@@ -5366,7 +5366,7 @@ static int dsi_get_clocks(struct platform_device *dsidev) | |||
5366 | return 0; | 5366 | return 0; |
5367 | } | 5367 | } |
5368 | 5368 | ||
5369 | static struct omap_dss_device * __init dsi_find_dssdev(struct platform_device *pdev) | 5369 | static struct omap_dss_device *dsi_find_dssdev(struct platform_device *pdev) |
5370 | { | 5370 | { |
5371 | struct omap_dss_board_info *pdata = pdev->dev.platform_data; | 5371 | struct omap_dss_board_info *pdata = pdev->dev.platform_data; |
5372 | struct dsi_data *dsi = dsi_get_dsidrv_data(pdev); | 5372 | struct dsi_data *dsi = dsi_get_dsidrv_data(pdev); |
@@ -5398,7 +5398,7 @@ static struct omap_dss_device * __init dsi_find_dssdev(struct platform_device *p | |||
5398 | return def_dssdev; | 5398 | return def_dssdev; |
5399 | } | 5399 | } |
5400 | 5400 | ||
5401 | static void __init dsi_probe_pdata(struct platform_device *dsidev) | 5401 | static void dsi_probe_pdata(struct platform_device *dsidev) |
5402 | { | 5402 | { |
5403 | struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); | 5403 | struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); |
5404 | struct omap_dss_device *plat_dssdev; | 5404 | struct omap_dss_device *plat_dssdev; |
@@ -5436,11 +5436,13 @@ static void __init dsi_probe_pdata(struct platform_device *dsidev) | |||
5436 | DSSERR("device %s register failed: %d\n", dssdev->name, r); | 5436 | DSSERR("device %s register failed: %d\n", dssdev->name, r); |
5437 | omapdss_output_unset_device(&dsi->output); | 5437 | omapdss_output_unset_device(&dsi->output); |
5438 | dss_put_device(dssdev); | 5438 | dss_put_device(dssdev); |
5439 | return; | 5439 | return r; |
5440 | } | 5440 | } |
5441 | |||
5442 | return 0; | ||
5441 | } | 5443 | } |
5442 | 5444 | ||
5443 | static void __init dsi_init_output(struct platform_device *dsidev) | 5445 | static void dsi_init_output(struct platform_device *dsidev) |
5444 | { | 5446 | { |
5445 | struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); | 5447 | struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); |
5446 | struct omap_dss_output *out = &dsi->output; | 5448 | struct omap_dss_output *out = &dsi->output; |
@@ -5465,7 +5467,7 @@ static void __exit dsi_uninit_output(struct platform_device *dsidev) | |||
5465 | } | 5467 | } |
5466 | 5468 | ||
5467 | /* DSI1 HW IP initialisation */ | 5469 | /* DSI1 HW IP initialisation */ |
5468 | static int __init omap_dsihw_probe(struct platform_device *dsidev) | 5470 | static int omap_dsihw_probe(struct platform_device *dsidev) |
5469 | { | 5471 | { |
5470 | u32 rev; | 5472 | u32 rev; |
5471 | int r, i; | 5473 | int r, i; |
@@ -5632,6 +5634,7 @@ static const struct dev_pm_ops dsi_pm_ops = { | |||
5632 | }; | 5634 | }; |
5633 | 5635 | ||
5634 | static struct platform_driver omap_dsihw_driver = { | 5636 | static struct platform_driver omap_dsihw_driver = { |
5637 | .probe = omap_dsihw_probe, | ||
5635 | .remove = __exit_p(omap_dsihw_remove), | 5638 | .remove = __exit_p(omap_dsihw_remove), |
5636 | .driver = { | 5639 | .driver = { |
5637 | .name = "omapdss_dsi", | 5640 | .name = "omapdss_dsi", |
@@ -5642,7 +5645,7 @@ static struct platform_driver omap_dsihw_driver = { | |||
5642 | 5645 | ||
5643 | int __init dsi_init_platform_driver(void) | 5646 | int __init dsi_init_platform_driver(void) |
5644 | { | 5647 | { |
5645 | return platform_driver_probe(&omap_dsihw_driver, omap_dsihw_probe); | 5648 | return platform_driver_register(&omap_dsihw_driver); |
5646 | } | 5649 | } |
5647 | 5650 | ||
5648 | void __exit dsi_uninit_platform_driver(void) | 5651 | void __exit dsi_uninit_platform_driver(void) |