summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/gpio.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2012-05-14 22:35:04 +0200
committerArnd Bergmann <arnd@arndb.de>2012-05-15 13:44:11 +0200
commitdeb88cc3c69975cbd9875ed9fac259b351f6b64d (patch)
treeece2ffba5c3e585cf649d73e4ea1784037335468 /arch/arm/mach-omap2/gpio.c
parentecf1b318347f6c250293ee8a9f2597373b00e0c3 (diff)
parent7f217794ffa72f208a250b79ab0b7ea3de19677f (diff)
Merge branch 'drivers/mmc' into next/dt2
Changes in the dt2 branch move stuff around that gets changed in the drivers/mmc branch. I chose a non-obvious resolution by adding the new bus-width property into all the tegra sdhci device nodes. Conflicts: arch/arm/boot/dts/tegra-cardhu.dts arch/arm/boot/dts/tegra-harmony.dts arch/arm/boot/dts/tegra-ventana.dts Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-omap2/gpio.c')
-rw-r--r--arch/arm/mach-omap2/gpio.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/gpio.c b/arch/arm/mach-omap2/gpio.c
index 2f994e5194e8..18f9c7bd7200 100644
--- a/arch/arm/mach-omap2/gpio.c
+++ b/arch/arm/mach-omap2/gpio.c
@@ -20,6 +20,7 @@
#include <linux/err.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
+#include <linux/of.h>
#include <plat/omap_hwmod.h>
#include <plat/omap_device.h>
@@ -146,7 +147,10 @@ static int __init omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused)
*/
static int __init omap2_gpio_init(void)
{
- return omap_hwmod_for_each_by_class("gpio", omap2_gpio_dev_init,
- NULL);
+ /* If dtb is there, the devices will be created dynamically */
+ if (of_have_populated_dt())
+ return -ENODEV;
+
+ return omap_hwmod_for_each_by_class("gpio", omap2_gpio_dev_init, NULL);
}
postcore_initcall(omap2_gpio_init);