提交 6e7e8f06 编写于 作者: T Tomi Valkeinen

OMAPDSS: add __init & __exit

Now that we are using platform_driver_probe() we can add __inits and
__exits all around.
Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
上级 61055d4b
......@@ -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;
......
......@@ -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 @@ static int omap_dispchw_probe(struct platform_device *pdev)
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);
}
......@@ -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);
}
......@@ -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 @@ static int omap_dsihw_probe(struct platform_device *dsidev)
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);
}
......@@ -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 @@ static int omap_dsshw_probe(struct platform_device *pdev)
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);
}
......
......@@ -231,7 +231,7 @@ int dss_ovl_check(struct omap_overlay *ovl, struct omap_overlay_info *info,
const struct omap_video_timings *mgr_timings);
/* DSS */
int dss_init_platform_driver(void);
int dss_init_platform_driver(void) __init;
void dss_uninit_platform_driver(void);
void dss_select_hdmi_venc_clk_source(enum dss_hdmi_venc_clk_source_select);
......@@ -268,8 +268,8 @@ int dss_calc_clock_div(bool is_tft, unsigned long req_pck,
struct dispc_clock_info *dispc_cinfo);
/* SDI */
int sdi_init_platform_driver(void);
void sdi_uninit_platform_driver(void);
int sdi_init_platform_driver(void) __init;
void sdi_uninit_platform_driver(void) __exit;
int sdi_init_display(struct omap_dss_device *display);
/* DSI */
......@@ -278,8 +278,8 @@ int sdi_init_display(struct omap_dss_device *display);
struct dentry;
struct file_operations;
int dsi_init_platform_driver(void);
void dsi_uninit_platform_driver(void);
int dsi_init_platform_driver(void) __init;
void dsi_uninit_platform_driver(void) __exit;
int dsi_runtime_get(struct platform_device *dsidev);
void dsi_runtime_put(struct platform_device *dsidev);
......@@ -359,13 +359,13 @@ static inline struct platform_device *dsi_get_dsidev_from_id(int module)
#endif
/* DPI */
int dpi_init_platform_driver(void);
void dpi_uninit_platform_driver(void);
int dpi_init_platform_driver(void) __init;
void dpi_uninit_platform_driver(void) __exit;
int dpi_init_display(struct omap_dss_device *dssdev);
/* DISPC */
int dispc_init_platform_driver(void);
void dispc_uninit_platform_driver(void);
int dispc_init_platform_driver(void) __init;
void dispc_uninit_platform_driver(void) __exit;
void dispc_dump_clocks(struct seq_file *s);
void dispc_irq_handler(void);
......@@ -430,8 +430,8 @@ void dispc_mgr_setup(enum omap_channel channel,
/* VENC */
#ifdef CONFIG_OMAP2_DSS_VENC
int venc_init_platform_driver(void);
void venc_uninit_platform_driver(void);
int venc_init_platform_driver(void) __init;
void venc_uninit_platform_driver(void) __exit;
int venc_init_display(struct omap_dss_device *display);
unsigned long venc_get_pixel_clock(void);
#else
......@@ -444,8 +444,8 @@ static inline unsigned long venc_get_pixel_clock(void)
/* HDMI */
#ifdef CONFIG_OMAP4_DSS_HDMI
int hdmi_init_platform_driver(void);
void hdmi_uninit_platform_driver(void);
int hdmi_init_platform_driver(void) __init;
void hdmi_uninit_platform_driver(void) __exit;
int hdmi_init_display(struct omap_dss_device *dssdev);
unsigned long hdmi_get_pixel_clock(void);
#else
......@@ -470,8 +470,8 @@ int hdmi_panel_init(void);
void hdmi_panel_exit(void);
/* RFBI */
int rfbi_init_platform_driver(void);
void rfbi_uninit_platform_driver(void);
int rfbi_init_platform_driver(void) __init;
void rfbi_uninit_platform_driver(void) __exit;
int rfbi_init_display(struct omap_dss_device *display);
......
......@@ -772,7 +772,7 @@ static void hdmi_put_clocks(void)
}
/* HDMI HW IP initialisation */
static int omapdss_hdmihw_probe(struct platform_device *pdev)
static int __init omapdss_hdmihw_probe(struct platform_device *pdev)
{
struct resource *hdmi_mem;
int r;
......@@ -826,7 +826,7 @@ static int omapdss_hdmihw_probe(struct platform_device *pdev)
return 0;
}
static int omapdss_hdmihw_remove(struct platform_device *pdev)
static int __exit omapdss_hdmihw_remove(struct platform_device *pdev)
{
hdmi_panel_exit();
......@@ -872,7 +872,7 @@ static const struct dev_pm_ops hdmi_pm_ops = {
};
static struct platform_driver omapdss_hdmihw_driver = {
.remove = omapdss_hdmihw_remove,
.remove = __exit_p(omapdss_hdmihw_remove),
.driver = {
.name = "omapdss_hdmi",
.owner = THIS_MODULE,
......@@ -880,12 +880,12 @@ static struct platform_driver omapdss_hdmihw_driver = {
},
};
int hdmi_init_platform_driver(void)
int __init hdmi_init_platform_driver(void)
{
return platform_driver_probe(&omapdss_hdmihw_driver, omapdss_hdmihw_probe);
}
void hdmi_uninit_platform_driver(void)
void __exit hdmi_uninit_platform_driver(void)
{
platform_driver_unregister(&omapdss_hdmihw_driver);
}
......@@ -928,7 +928,7 @@ int rfbi_init_display(struct omap_dss_device *dssdev)
}
/* RFBI HW IP initialisation */
static int omap_rfbihw_probe(struct platform_device *pdev)
static int __init omap_rfbihw_probe(struct platform_device *pdev)
{
u32 rev;
struct resource *rfbi_mem;
......@@ -985,7 +985,7 @@ static int omap_rfbihw_probe(struct platform_device *pdev)
return r;
}
static int omap_rfbihw_remove(struct platform_device *pdev)
static int __exit omap_rfbihw_remove(struct platform_device *pdev)
{
pm_runtime_disable(&pdev->dev);
return 0;
......@@ -1015,7 +1015,7 @@ static const struct dev_pm_ops rfbi_pm_ops = {
};
static struct platform_driver omap_rfbihw_driver = {
.remove = omap_rfbihw_remove,
.remove = __exit_p(omap_rfbihw_remove),
.driver = {
.name = "omapdss_rfbi",
.owner = THIS_MODULE,
......@@ -1023,12 +1023,12 @@ static struct platform_driver omap_rfbihw_driver = {
},
};
int rfbi_init_platform_driver(void)
int __init rfbi_init_platform_driver(void)
{
return platform_driver_probe(&omap_rfbihw_driver, omap_rfbihw_probe);
}
void rfbi_uninit_platform_driver(void)
void __exit rfbi_uninit_platform_driver(void)
{
platform_driver_unregister(&omap_rfbihw_driver);
}
......@@ -176,30 +176,30 @@ int sdi_init_display(struct omap_dss_device *dssdev)
return 0;
}
static int omap_sdi_probe(struct platform_device *pdev)
static int __init omap_sdi_probe(struct platform_device *pdev)
{
return 0;
}
static int omap_sdi_remove(struct platform_device *pdev)
static int __exit omap_sdi_remove(struct platform_device *pdev)
{
return 0;
}
static struct platform_driver omap_sdi_driver = {
.remove = omap_sdi_remove,
.remove = __exit_p(omap_sdi_remove),
.driver = {
.name = "omapdss_sdi",
.owner = THIS_MODULE,
},
};
int sdi_init_platform_driver(void)
int __init sdi_init_platform_driver(void)
{
return platform_driver_probe(&omap_sdi_driver, omap_sdi_probe);
}
void sdi_uninit_platform_driver(void)
void __exit sdi_uninit_platform_driver(void)
{
platform_driver_unregister(&omap_sdi_driver);
}
......@@ -830,7 +830,7 @@ static void venc_put_clocks(void)
}
/* VENC HW IP initialisation */
static int omap_venchw_probe(struct platform_device *pdev)
static int __init omap_venchw_probe(struct platform_device *pdev)
{
u8 rev_id;
struct resource *venc_mem;
......@@ -885,7 +885,7 @@ static int omap_venchw_probe(struct platform_device *pdev)
return r;
}
static int omap_venchw_remove(struct platform_device *pdev)
static int __exit omap_venchw_remove(struct platform_device *pdev)
{
if (venc.vdda_dac_reg != NULL) {
regulator_put(venc.vdda_dac_reg);
......@@ -929,7 +929,7 @@ static const struct dev_pm_ops venc_pm_ops = {
};
static struct platform_driver omap_venchw_driver = {
.remove = omap_venchw_remove,
.remove = __exit_p(omap_venchw_remove),
.driver = {
.name = "omapdss_venc",
.owner = THIS_MODULE,
......@@ -937,7 +937,7 @@ static struct platform_driver omap_venchw_driver = {
},
};
int venc_init_platform_driver(void)
int __init venc_init_platform_driver(void)
{
if (cpu_is_omap44xx())
return 0;
......@@ -945,7 +945,7 @@ int venc_init_platform_driver(void)
return platform_driver_probe(&omap_venchw_driver, omap_venchw_probe);
}
void venc_uninit_platform_driver(void)
void __exit venc_uninit_platform_driver(void)
{
if (cpu_is_omap44xx())
return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册