From patchwork Fri Nov 9 11:39:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 1720061 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id BD0623FCDF for ; Fri, 9 Nov 2012 11:47:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753082Ab2KILqV (ORCPT ); Fri, 9 Nov 2012 06:46:21 -0500 Received: from mail-pb0-f46.google.com ([209.85.160.46]:36122 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753073Ab2KILqT (ORCPT ); Fri, 9 Nov 2012 06:46:19 -0500 Received: by mail-pb0-f46.google.com with SMTP id rr4so2787918pbb.19 for ; Fri, 09 Nov 2012 03:46:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=IJolx1Fv87ryPzxFEu4SbYIS4yldfoZh750pCp9T48w=; b=Dm5U3cVUJnwrLxvy7yNhU29BRnrjyY43Wot1mf/iPL1Btp85a/+iGSdppuF1/dzsa4 ACR0mX+KM0o05uAsysPhQkdaH8eEBnBTI55Nj9Shs+lLMZZ3vlvbMUp/YLF1S0YpJpq0 m9/VWMuDo94PHycZjvXaBKmD4DXkPsATlqhQvMOPPf+Q+FOS8la9nsy4Ghg2H9YDr6gk ly7u36i+F0A4RTw2fvX8AIjpWcA5/fswoc6a3TUgSxNYTPqGiJaf1hBwK/oxxsdO/5zX RcaMyIWlVRmO/Rvp4qMDAiGe6gbAwLQ7+jF4CnOVEgTfAYJWVtm2Mo4Oi+B8cHQsxIMG kz8g== Received: by 10.68.189.70 with SMTP id gg6mr3578012pbc.97.1352461578965; Fri, 09 Nov 2012 03:46:18 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id tm8sm17629901pbc.48.2012.11.09.03.46.15 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 09 Nov 2012 03:46:18 -0800 (PST) From: Tushar Behera To: linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org Cc: cjb@laptop.org, patches@linaro.org Subject: [PATCH 8/8] mmc: sdhci: fix coding style in sdhci_add_host Date: Fri, 9 Nov 2012 17:09:58 +0530 Message-Id: <1352461198-21941-9-git-send-email-tushar.behera@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1352461198-21941-1-git-send-email-tushar.behera@linaro.org> References: <1352461198-21941-1-git-send-email-tushar.behera@linaro.org> X-Gm-Message-State: ALoCoQmMK0Hgm7zlcbbMP8ZTZ/cCoBplXJjC8i9qbxfdNmcFeWTTiluIeR3RbSe+AgeUG+B/8/oJ Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Signed-off-by: Tushar Behera --- drivers/mmc/host/sdhci.c | 20 ++++++++++++-------- 1 files changed, 12 insertions(+), 8 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 47cac71..5cddb74 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -2786,16 +2786,18 @@ int sdhci_add_host(struct sdhci_host *host) */ mmc->ops = &sdhci_ops; mmc->f_max = host->max_clk; - if (host->ops->get_min_clock) + if (host->ops->get_min_clock) { mmc->f_min = host->ops->get_min_clock(host); - else if (host->version >= SDHCI_SPEC_300) { + } else if (host->version >= SDHCI_SPEC_300) { if (host->clk_mul) { mmc->f_min = (host->max_clk * host->clk_mul) / 1024; mmc->f_max = host->max_clk * host->clk_mul; - } else + } else { mmc->f_min = host->max_clk / SDHCI_MAX_DIV_SPEC_300; - } else + } + } else { mmc->f_min = host->max_clk / SDHCI_MAX_DIV_SPEC_200; + } host->timeout_clk = (caps[0] & SDHCI_TIMEOUT_CLK_MASK) >> SDHCI_TIMEOUT_CLK_SHIFT; @@ -2860,12 +2862,13 @@ int sdhci_add_host(struct sdhci_host *host) mmc_hostname(mmc)); host->vqmmc = NULL; } - } - else if (regulator_is_supported_voltage(host->vqmmc, 1800000, 1800000)) + } else if (regulator_is_supported_voltage(host->vqmmc, + 1800000, 1800000)) { regulator_enable(host->vqmmc); - else + } else { caps[1] &= ~(SDHCI_SUPPORT_SDR104 | SDHCI_SUPPORT_SDR50 | SDHCI_SUPPORT_DDR50); + } /* Any UHS-I mode in caps implies SDR12 and SDR25 support. */ if (caps[1] & (SDHCI_SUPPORT_SDR104 | SDHCI_SUPPORT_SDR50 | @@ -2921,8 +2924,9 @@ int sdhci_add_host(struct sdhci_host *host) mmc_hostname(mmc)); host->vmmc = NULL; } - } else + } else { regulator_enable(host->vmmc); + } #ifdef CONFIG_REGULATOR if (host->vmmc) {