aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 5bb25e319b76..100115ff1d96 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -1434,19 +1434,17 @@ void omap_hwmod_ocp_barrier(struct omap_hwmod *oh)
1434 * 1434 *
1435 * Under some conditions, a driver may wish to reset the entire device. 1435 * Under some conditions, a driver may wish to reset the entire device.
1436 * Called from omap_device code. Returns -EINVAL on error or passes along 1436 * Called from omap_device code. Returns -EINVAL on error or passes along
1437 * the return value from _reset()/_enable(). 1437 * the return value from _reset().
1438 */ 1438 */
1439int omap_hwmod_reset(struct omap_hwmod *oh) 1439int omap_hwmod_reset(struct omap_hwmod *oh)
1440{ 1440{
1441 int r; 1441 int r;
1442 1442
1443 if (!oh || !(oh->_state & _HWMOD_STATE_ENABLED)) 1443 if (!oh)
1444 return -EINVAL; 1444 return -EINVAL;
1445 1445
1446 mutex_lock(&omap_hwmod_mutex); 1446 mutex_lock(&omap_hwmod_mutex);
1447 r = _reset(oh); 1447 r = _reset(oh);
1448 if (!r)
1449 r = _omap_hwmod_enable(oh);
1450 mutex_unlock(&omap_hwmod_mutex); 1448 mutex_unlock(&omap_hwmod_mutex);
1451 1449
1452 return r; 1450 return r;