Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6e7e8f06 authored by Tomi Valkeinen's avatar Tomi Valkeinen
Browse files

OMAPDSS: add __init & __exit



Now that we are using platform_driver_probe() we can add __inits and
__exits all around.

Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent 61055d4b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -203,7 +203,7 @@ static inline int dss_debugfs_create_file(const char *name,
#endif /* CONFIG_DEBUG_FS && CONFIG_OMAP2_DSS_DEBUG_SUPPORT */

/* PLATFORM DEVICE */
static int omap_dss_probe(struct platform_device *pdev)
static int __init omap_dss_probe(struct platform_device *pdev)
{
	struct omap_dss_board_info *pdata = pdev->dev.platform_data;
	int r;
@@ -483,7 +483,7 @@ static void omap_dss_unregister_device(struct omap_dss_device *dssdev)
}

/* BUS */
static int omap_dss_bus_register(void)
static int __init omap_dss_bus_register(void)
{
	int r;

+5 −5
Original line number Diff line number Diff line
@@ -3482,7 +3482,7 @@ static void _omap_dispc_initial_config(void)
}

/* DISPC HW IP initialisation */
static int omap_dispchw_probe(struct platform_device *pdev)
static int __init omap_dispchw_probe(struct platform_device *pdev)
{
	u32 rev;
	int r = 0;
@@ -3564,7 +3564,7 @@ err_runtime_get:
	return r;
}

static int omap_dispchw_remove(struct platform_device *pdev)
static int __exit omap_dispchw_remove(struct platform_device *pdev)
{
	pm_runtime_disable(&pdev->dev);

@@ -3593,7 +3593,7 @@ static const struct dev_pm_ops dispc_pm_ops = {
};

static struct platform_driver omap_dispchw_driver = {
	.remove         = omap_dispchw_remove,
	.remove         = __exit_p(omap_dispchw_remove),
	.driver         = {
		.name   = "omapdss_dispc",
		.owner  = THIS_MODULE,
@@ -3601,12 +3601,12 @@ static struct platform_driver omap_dispchw_driver = {
	},
};

int dispc_init_platform_driver(void)
int __init dispc_init_platform_driver(void)
{
	return platform_driver_probe(&omap_dispchw_driver, omap_dispchw_probe);
}

void dispc_uninit_platform_driver(void)
void __exit dispc_uninit_platform_driver(void)
{
	platform_driver_unregister(&omap_dispchw_driver);
}
+5 −5
Original line number Diff line number Diff line
@@ -365,30 +365,30 @@ int dpi_init_display(struct omap_dss_device *dssdev)
	return 0;
}

static int omap_dpi_probe(struct platform_device *pdev)
static int __init omap_dpi_probe(struct platform_device *pdev)
{
	return 0;
}

static int omap_dpi_remove(struct platform_device *pdev)
static int __exit omap_dpi_remove(struct platform_device *pdev)
{
	return 0;
}

static struct platform_driver omap_dpi_driver = {
	.remove         = omap_dpi_remove,
	.remove         = __exit_p(omap_dpi_remove),
	.driver         = {
		.name   = "omapdss_dpi",
		.owner  = THIS_MODULE,
	},
};

int dpi_init_platform_driver(void)
int __init dpi_init_platform_driver(void)
{
	return platform_driver_probe(&omap_dpi_driver, omap_dpi_probe);
}

void dpi_uninit_platform_driver(void)
void __exit dpi_uninit_platform_driver(void)
{
	platform_driver_unregister(&omap_dpi_driver);
}
+5 −5
Original line number Diff line number Diff line
@@ -4608,7 +4608,7 @@ static void dsi_put_clocks(struct platform_device *dsidev)
}

/* DSI1 HW IP initialisation */
static int omap_dsihw_probe(struct platform_device *dsidev)
static int __init omap_dsihw_probe(struct platform_device *dsidev)
{
	u32 rev;
	int r, i, dsi_module = dsi_get_dsidev_id(dsidev);
@@ -4721,7 +4721,7 @@ err_runtime_get:
	return r;
}

static int omap_dsihw_remove(struct platform_device *dsidev)
static int __exit omap_dsihw_remove(struct platform_device *dsidev)
{
	struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);

@@ -4768,7 +4768,7 @@ static const struct dev_pm_ops dsi_pm_ops = {
};

static struct platform_driver omap_dsihw_driver = {
	.remove         = omap_dsihw_remove,
	.remove         = __exit_p(omap_dsihw_remove),
	.driver         = {
		.name   = "omapdss_dsi",
		.owner  = THIS_MODULE,
@@ -4776,12 +4776,12 @@ static struct platform_driver omap_dsihw_driver = {
	},
};

int dsi_init_platform_driver(void)
int __init dsi_init_platform_driver(void)
{
	return platform_driver_probe(&omap_dsihw_driver, omap_dsihw_probe);
}

void dsi_uninit_platform_driver(void)
void __exit dsi_uninit_platform_driver(void)
{
	platform_driver_unregister(&omap_dsihw_driver);
}
+4 −4
Original line number Diff line number Diff line
@@ -744,7 +744,7 @@ void dss_debug_dump_clocks(struct seq_file *s)
#endif

/* DSS HW IP initialisation */
static int omap_dsshw_probe(struct platform_device *pdev)
static int __init omap_dsshw_probe(struct platform_device *pdev)
{
	struct resource *dss_mem;
	u32 rev;
@@ -805,7 +805,7 @@ err_runtime_get:
	return r;
}

static int omap_dsshw_remove(struct platform_device *pdev)
static int __exit omap_dsshw_remove(struct platform_device *pdev)
{
	pm_runtime_disable(&pdev->dev);

@@ -845,7 +845,7 @@ static const struct dev_pm_ops dss_pm_ops = {
};

static struct platform_driver omap_dsshw_driver = {
	.remove         = omap_dsshw_remove,
	.remove         = __exit_p(omap_dsshw_remove),
	.driver         = {
		.name   = "omapdss_dss",
		.owner  = THIS_MODULE,
@@ -853,7 +853,7 @@ static struct platform_driver omap_dsshw_driver = {
	},
};

int dss_init_platform_driver(void)
int __init dss_init_platform_driver(void)
{
	return platform_driver_probe(&omap_dsshw_driver, omap_dsshw_probe);
}
Loading