diff options
author | Tony Lindgren <tony@atomide.com> | 2014-11-20 12:45:43 -0800 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2014-11-28 12:54:26 -0800 |
commit | a86128093845e1947454c68040d69259c805f882 (patch) | |
tree | 22e99ae736f8b8541fdd602b798d7f722e5d6118 /arch/arm/mach-omap2/gpmc.c | |
parent | e639cd5bfc03de7ba642d7e8570b9e533f10e54b (diff) |
ARM: OMAP2+: Move GPMC initcall to devices.c
This will us allow to just move gpmc.c to live under drivers
in the next patch.
Note that we now also remove the omap specific check for the
initcall. That's OK as gpmc_probe() checks for the pdata
and bails out for other platforms compiled in.
Also the postcore_initcall() maybe possible to change to
just regular module_init(), but let's do that in separate
patch after the move to drivers is done.
Cc: Arnd Bergmann <arnd@arndb.de>
Acked-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/gpmc.c')
-rw-r--r-- | arch/arm/mach-omap2/gpmc.c | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index 0753a046fed2..abfc0ddd076e 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c @@ -36,9 +36,6 @@ #include <linux/platform_data/mtd-nand-omap2.h> #include <linux/platform_data/mtd-onenand-omap2.h> -#include "soc.h" -#include "omap_device.h" - #include <asm/mach-types.h> #define DEVICE_NAME "omap-gpmc" @@ -2009,35 +2006,9 @@ static __exit void gpmc_exit(void) } -omap_postcore_initcall(gpmc_init); +postcore_initcall(gpmc_init); module_exit(gpmc_exit); -static int __init omap_gpmc_init(void) -{ - struct omap_hwmod *oh; - struct platform_device *pdev; - char *oh_name = "gpmc"; - - /* - * if the board boots up with a populated DT, do not - * manually add the device from this initcall - */ - if (of_have_populated_dt()) - return -ENODEV; - - oh = omap_hwmod_lookup(oh_name); - if (!oh) { - pr_err("Could not look up %s\n", oh_name); - return -ENODEV; - } - - pdev = omap_device_build(DEVICE_NAME, -1, oh, NULL, 0); - WARN(IS_ERR(pdev), "could not build omap_device for %s\n", oh_name); - - return PTR_RET(pdev); -} -omap_postcore_initcall(omap_gpmc_init); - static irqreturn_t gpmc_handle_irq(int irq, void *dev) { int i; |