diff options
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod.c | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 9e89a58711b7..2a7ab6adee82 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -162,9 +162,6 @@ static LIST_HEAD(omap_hwmod_list); | |||
162 | /* mpu_oh: used to add/remove MPU initiator from sleepdep list */ | 162 | /* mpu_oh: used to add/remove MPU initiator from sleepdep list */ |
163 | static struct omap_hwmod *mpu_oh; | 163 | static struct omap_hwmod *mpu_oh; |
164 | 164 | ||
165 | /* inited: 0 if omap_hwmod_init() has not yet been called; 1 otherwise */ | ||
166 | static u8 inited; | ||
167 | |||
168 | 165 | ||
169 | /* Private functions */ | 166 | /* Private functions */ |
170 | 167 | ||
@@ -1595,26 +1592,20 @@ int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh, void *data), | |||
1595 | */ | 1592 | */ |
1596 | int __init omap_hwmod_init(struct omap_hwmod **ohs) | 1593 | int __init omap_hwmod_init(struct omap_hwmod **ohs) |
1597 | { | 1594 | { |
1598 | struct omap_hwmod *oh; | 1595 | int r, i; |
1599 | int r; | ||
1600 | |||
1601 | if (inited) | ||
1602 | return -EINVAL; | ||
1603 | |||
1604 | inited = 1; | ||
1605 | 1596 | ||
1606 | if (!ohs) | 1597 | if (!ohs) |
1607 | return 0; | 1598 | return 0; |
1608 | 1599 | ||
1609 | oh = *ohs; | 1600 | i = 0; |
1610 | while (oh) { | 1601 | do { |
1611 | if (omap_chip_is(oh->omap_chip)) { | 1602 | if (!omap_chip_is(ohs[i]->omap_chip)) |
1612 | r = _register(oh); | 1603 | continue; |
1613 | WARN(r, "omap_hwmod: %s: _register returned " | 1604 | |
1614 | "%d\n", oh->name, r); | 1605 | r = _register(ohs[i]); |
1615 | } | 1606 | WARN(r, "omap_hwmod: %s: _register returned %d\n", ohs[i]->name, |
1616 | oh = *++ohs; | 1607 | r); |
1617 | } | 1608 | } while (ohs[++i]); |
1618 | 1609 | ||
1619 | return 0; | 1610 | return 0; |
1620 | } | 1611 | } |