diff options
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod.c')
| -rw-r--r-- | arch/arm/mach-omap2/omap_hwmod.c | 12 | 
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 2af6ff63e3b4..83cb527755a9 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -2207,15 +2207,15 @@ static int _idle(struct omap_hwmod *oh)  	pr_debug("omap_hwmod: %s: idling\n", oh->name); +	if (_are_all_hardreset_lines_asserted(oh)) +		return 0; +  	if (oh->_state != _HWMOD_STATE_ENABLED) {  		WARN(1, "omap_hwmod: %s: idle state can only be entered from enabled state\n",  			oh->name);  		return -EINVAL;  	} -	if (_are_all_hardreset_lines_asserted(oh)) -		return 0; -  	if (oh->class->sysc)  		_idle_sysc(oh);  	_del_initiator_dep(oh, mpu_oh); @@ -2262,6 +2262,9 @@ static int _shutdown(struct omap_hwmod *oh)  	int ret, i;  	u8 prev_state; +	if (_are_all_hardreset_lines_asserted(oh)) +		return 0; +  	if (oh->_state != _HWMOD_STATE_IDLE &&  	    oh->_state != _HWMOD_STATE_ENABLED) {  		WARN(1, "omap_hwmod: %s: disabled state can only be entered from idle, or enabled state\n", @@ -2269,9 +2272,6 @@ static int _shutdown(struct omap_hwmod *oh)  		return -EINVAL;  	} -	if (_are_all_hardreset_lines_asserted(oh)) -		return 0; -  	pr_debug("omap_hwmod: %s: disabling\n", oh->name);  	if (oh->class->pre_shutdown) {  |