From patchwork Wed Mar 23 18:49:52 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: omar ramirez X-Patchwork-Id: 656741 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p2NJ1OlM014753 for ; Wed, 23 Mar 2011 19:01:24 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932691Ab1CWTBV (ORCPT ); Wed, 23 Mar 2011 15:01:21 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:47142 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932657Ab1CWTBQ (ORCPT ); Wed, 23 Mar 2011 15:01:16 -0400 Received: from dlep34.itg.ti.com ([157.170.170.115]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id p2NJ1EWk001585 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 23 Mar 2011 14:01:14 -0500 Received: from legion.dal.design.ti.com (localhost [127.0.0.1]) by dlep34.itg.ti.com (8.13.7/8.13.7) with ESMTP id p2NJ1E82011679; Wed, 23 Mar 2011 14:01:14 -0500 (CDT) Received: from localhost (bacab.am.dhcp.ti.com [128.247.77.143]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id p2NJ1Ef09267; Wed, 23 Mar 2011 14:01:14 -0500 (CDT) From: Omar Ramirez Luna To: l-o Cc: Omar Ramirez Luna , Fernando Guzman Lugo , Armando Uribe , Felipe Contreras Subject: [PATCH 7/8] staging: tidspbridge: remove redundant indentation in PM routines Date: Wed, 23 Mar 2011 12:49:52 -0600 Message-Id: <1300906193-1732-8-git-send-email-omar.ramirez@ti.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1300906193-1732-1-git-send-email-omar.ramirez@ti.com> References: <1300906193-1732-1-git-send-email-omar.ramirez@ti.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 23 Mar 2011 19:01:24 +0000 (UTC) diff --git a/drivers/staging/tidspbridge/core/tiomap3430_pwr.c b/drivers/staging/tidspbridge/core/tiomap3430_pwr.c index cb2a873..95089ef 100644 --- a/drivers/staging/tidspbridge/core/tiomap3430_pwr.c +++ b/drivers/staging/tidspbridge/core/tiomap3430_pwr.c @@ -104,36 +104,31 @@ int handle_hibernation_from_dsp(struct bridge_dev_context *dev_context) if (!t) { pr_err("%s: Timed out waiting for DSP off mode\n", __func__); return -ETIMEDOUT; - } else { + } - /* Save mailbox settings */ - omap_mbox_save_ctx(dev_context->mbox); + /* Save mailbox settings */ + omap_mbox_save_ctx(dev_context->mbox); - /* Turn off DSP Peripheral clocks and DSP Load monitor timer */ - status = dsp_clock_disable_all(dev_context->dsp_per_clks); + /* Turn off DSP Peripheral clocks and DSP Load monitor timer */ + status = dsp_clock_disable_all(dev_context->dsp_per_clks); + if (status) + return status; - /* Disable wdt on hibernation. */ - dsp_wdt_enable(false); + /* Disable wdt on hibernation. */ + dsp_wdt_enable(false); - if (!status) { - /* Update the Bridger Driver state */ - dev_context->brd_state = BRD_DSP_HIBERNATION; + /* Update the Bridger Driver state */ + dev_context->brd_state = BRD_DSP_HIBERNATION; #ifdef CONFIG_TIDSPBRIDGE_DVFS - status = - dev_get_io_mgr(dev_context->dev_obj, &hio_mgr); - if (!hio_mgr) - return -EINVAL; - io_sh_msetting(hio_mgr, SHM_GETOPP, &opplevel); - - /* - * Set the OPP to low level before moving to OFF - * mode - */ - if (pdata->dsp_set_min_opp) - (*pdata->dsp_set_min_opp) (VDD1_OPP1); + status = dev_get_io_mgr(dev_context->dev_obj, &hio_mgr); + if (!hio_mgr) + return -EINVAL; + io_sh_msetting(hio_mgr, SHM_GETOPP, &opplevel); + + /* Set the OPP to low level before moving to OFF mode */ + if (pdata->dsp_set_min_opp) + (*pdata->dsp_set_min_opp) (VDD1_OPP1); #endif /* CONFIG_TIDSPBRIDGE_DVFS */ - } - } #endif return status; } @@ -218,30 +213,30 @@ int sleep_dsp(struct bridge_dev_context *dev_context, u32 dw_cmd, bridge_deh_notify(hdeh_mgr, DSP_PWRERROR, 0); #endif /* CONFIG_TIDSPBRIDGE_NTFY_PWRERR */ return -ETIMEDOUT; - } else { - /* Update the Bridger Driver state */ - if (dsp_test_sleepstate == PWRDM_POWER_OFF) - dev_context->brd_state = BRD_HIBERNATION; - else - dev_context->brd_state = BRD_RETENTION; - - /* Disable wdt on hibernation. */ - dsp_wdt_enable(false); - - /* Turn off DSP Peripheral clocks */ - status = dsp_clock_disable_all(dev_context->dsp_per_clks); - if (status) - return status; + } + + /* Update the Bridger Driver state */ + if (dsp_test_sleepstate == PWRDM_POWER_OFF) + dev_context->brd_state = BRD_HIBERNATION; + else + dev_context->brd_state = BRD_RETENTION; + + /* Disable wdt on hibernation. */ + dsp_wdt_enable(false); + + /* Turn off DSP Peripheral clocks */ + status = dsp_clock_disable_all(dev_context->dsp_per_clks); + if (status) + return status; #ifdef CONFIG_TIDSPBRIDGE_DVFS - else if (target_pwr_state == PWRDM_POWER_OFF) { - /* - * Set the OPP to low level before moving to OFF mode - */ - if (pdata->dsp_set_min_opp) - (*pdata->dsp_set_min_opp) (VDD1_OPP1); - } -#endif /* CONFIG_TIDSPBRIDGE_DVFS */ + if (target_pwr_state == PWRDM_POWER_OFF) { + /* + * Set the OPP to low level before moving to OFF mode + */ + if (pdata->dsp_set_min_opp) + (*pdata->dsp_set_min_opp) (VDD1_OPP1); } +#endif /* CONFIG_TIDSPBRIDGE_DVFS */ #endif /* CONFIG_PM */ return status; }