summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/gpio.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2012-04-15 20:09:29 +0200
committerOlof Johansson <olof@lixom.net>2012-04-15 20:09:29 +0200
commit244cf2533ca91d7f6a4ed0a7e81df4bf93246c91 (patch)
tree4be320cfd8cabafe10d2177d8e2d70178300f16e /arch/arm/mach-omap2/gpio.c
parentLinux 3.4-rc2 (diff)
parentarm/dts: OMAP3: Add mmc controller nodes and board data (diff)
downloadlinux-244cf2533ca91d7f6a4ed0a7e81df4bf93246c91.tar.xz
linux-244cf2533ca91d7f6a4ed0a7e81df4bf93246c91.zip
Merge branch 'omap/dt-missed-3.4' into next/dt
* omap/dt-missed-3.4: arm/dts: OMAP3: Add mmc controller nodes and board data arm/dts: OMAP4: Add mmc controller nodes and board data arm/dts: twl: Pass regulator data from dt arm/dts: omap4-sdp: Add ks8851 ethernet SPI device arm/dts: OMAP3: Add SPI controller nodes arm/dts: OMAP4: Add SPI controller nodes arm/dts: OMAP3: Add gpio nodes arm/dts: OMAP4: Add gpio nodes ARM: OMAP2+: board-generic: Remove i2c static init arm/dts: omap3-beagle: Add twl4030 and i2c EEPROM arm/dts: omap4-sdp: Add twl6030, i2c3 and i2c4 devices arm/dts: omap4-panda: Add twl6030 and i2c EEPROM arm/dts: twl4030: Add DTS file for twl4030 PM + Audio IC arm/dts: twl6030: Add DTS file for twl6030 PMIC
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);