Commit ee4a24e2 authored by Tomi Valkeinen's avatar Tomi Valkeinen

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: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent d23b3357
...@@ -5225,7 +5225,7 @@ static enum omap_channel dsi_get_channel(int module_id) ...@@ -5225,7 +5225,7 @@ static enum omap_channel dsi_get_channel(int module_id)
} }
} }
static int __init dsi_init_display(struct omap_dss_device *dssdev) static int dsi_init_display(struct omap_dss_device *dssdev)
{ {
struct platform_device *dsidev = struct platform_device *dsidev =
dsi_get_dsidev_from_id(dssdev->phy.dsi.module); dsi_get_dsidev_from_id(dssdev->phy.dsi.module);
...@@ -5366,7 +5366,7 @@ static int dsi_get_clocks(struct platform_device *dsidev) ...@@ -5366,7 +5366,7 @@ static int dsi_get_clocks(struct platform_device *dsidev)
return 0; return 0;
} }
static struct omap_dss_device * __init dsi_find_dssdev(struct platform_device *pdev) static struct omap_dss_device *dsi_find_dssdev(struct platform_device *pdev)
{ {
struct omap_dss_board_info *pdata = pdev->dev.platform_data; struct omap_dss_board_info *pdata = pdev->dev.platform_data;
struct dsi_data *dsi = dsi_get_dsidrv_data(pdev); 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,7 +5398,7 @@ static struct omap_dss_device * __init dsi_find_dssdev(struct platform_device *p
return def_dssdev; return def_dssdev;
} }
static void __init dsi_probe_pdata(struct platform_device *dsidev) static void dsi_probe_pdata(struct platform_device *dsidev)
{ {
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
struct omap_dss_device *plat_dssdev; struct omap_dss_device *plat_dssdev;
...@@ -5436,11 +5436,13 @@ static void __init dsi_probe_pdata(struct platform_device *dsidev) ...@@ -5436,11 +5436,13 @@ static void __init dsi_probe_pdata(struct platform_device *dsidev)
DSSERR("device %s register failed: %d\n", dssdev->name, r); DSSERR("device %s register failed: %d\n", dssdev->name, r);
omapdss_output_unset_device(&dsi->output); omapdss_output_unset_device(&dsi->output);
dss_put_device(dssdev); dss_put_device(dssdev);
return; return r;
} }
return 0;
} }
static void __init dsi_init_output(struct platform_device *dsidev) static void dsi_init_output(struct platform_device *dsidev)
{ {
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
struct omap_dss_output *out = &dsi->output; struct omap_dss_output *out = &dsi->output;
...@@ -5465,7 +5467,7 @@ static void __exit dsi_uninit_output(struct platform_device *dsidev) ...@@ -5465,7 +5467,7 @@ static void __exit dsi_uninit_output(struct platform_device *dsidev)
} }
/* DSI1 HW IP initialisation */ /* DSI1 HW IP initialisation */
static int __init omap_dsihw_probe(struct platform_device *dsidev) static int omap_dsihw_probe(struct platform_device *dsidev)
{ {
u32 rev; u32 rev;
int r, i; int r, i;
...@@ -5632,6 +5634,7 @@ static const struct dev_pm_ops dsi_pm_ops = { ...@@ -5632,6 +5634,7 @@ static const struct dev_pm_ops dsi_pm_ops = {
}; };
static struct platform_driver omap_dsihw_driver = { static struct platform_driver omap_dsihw_driver = {
.probe = omap_dsihw_probe,
.remove = __exit_p(omap_dsihw_remove), .remove = __exit_p(omap_dsihw_remove),
.driver = { .driver = {
.name = "omapdss_dsi", .name = "omapdss_dsi",
...@@ -5642,7 +5645,7 @@ static struct platform_driver omap_dsihw_driver = { ...@@ -5642,7 +5645,7 @@ static struct platform_driver omap_dsihw_driver = {
int __init dsi_init_platform_driver(void) int __init dsi_init_platform_driver(void)
{ {
return platform_driver_probe(&omap_dsihw_driver, omap_dsihw_probe); return platform_driver_register(&omap_dsihw_driver);
} }
void __exit dsi_uninit_platform_driver(void) void __exit dsi_uninit_platform_driver(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment