diff options
author | Kevin Hilman <khilman@ti.com> | 2012-02-20 18:43:30 +0100 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2012-02-24 22:04:10 +0100 |
commit | 9cf793f9b8b1ba9414e2a7591b2e911885f85a27 (patch) | |
tree | 7ac9494904f303d04d00d6d8cc0aa65e2d77115d /arch/arm/plat-omap/omap_device.c | |
parent | ARM: OMAP2+: Mark omap_hsmmc_init and omap_mux related functions as __init (diff) | |
download | linux-9cf793f9b8b1ba9414e2a7591b2e911885f85a27.tar.xz linux-9cf793f9b8b1ba9414e2a7591b2e911885f85a27.zip |
ARM: OMAP: convert omap_device_build() and callers to __init
Building omap_devices should only be done at init time, and since
omap_device_build() is using early_platform calls which are also
__init, this ensures that omap_device isn't trying to use functions
that disappear.
Signed-off-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/plat-omap/omap_device.c')
-rw-r--r-- | arch/arm/plat-omap/omap_device.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c index f72fafc9e9f4..2d00ab01d150 100644 --- a/arch/arm/plat-omap/omap_device.c +++ b/arch/arm/plat-omap/omap_device.c @@ -1,3 +1,4 @@ + /* * omap_device implementation * @@ -612,7 +613,7 @@ void omap_device_delete(struct omap_device *od) * information. Returns ERR_PTR(-EINVAL) if @oh is NULL; otherwise, * passes along the return value of omap_device_build_ss(). */ -struct platform_device *omap_device_build(const char *pdev_name, int pdev_id, +struct platform_device __init *omap_device_build(const char *pdev_name, int pdev_id, struct omap_hwmod *oh, void *pdata, int pdata_len, struct omap_device_pm_latency *pm_lats, @@ -645,7 +646,7 @@ struct platform_device *omap_device_build(const char *pdev_name, int pdev_id, * platform_device record. Returns an ERR_PTR() on error, or passes * along the return value of omap_device_register(). */ -struct platform_device *omap_device_build_ss(const char *pdev_name, int pdev_id, +struct platform_device __init *omap_device_build_ss(const char *pdev_name, int pdev_id, struct omap_hwmod **ohs, int oh_cnt, void *pdata, int pdata_len, struct omap_device_pm_latency *pm_lats, @@ -710,7 +711,7 @@ odbs_exit: * platform_early_add_device() on the underlying platform_device. * Returns 0 by default. */ -static int omap_early_device_register(struct platform_device *pdev) +static int __init omap_early_device_register(struct platform_device *pdev) { struct platform_device *devices[1]; |