From patchwork Wed Sep 14 01:51:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Lin X-Patchwork-Id: 9330209 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B526A6048F for ; Wed, 14 Sep 2016 01:51:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9774E29839 for ; Wed, 14 Sep 2016 01:51:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 724872983F; Wed, 14 Sep 2016 01:51:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B80C829804 for ; Wed, 14 Sep 2016 01:51:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751676AbcINBvU (ORCPT ); Tue, 13 Sep 2016 21:51:20 -0400 Received: from lucky1.263xmail.com ([211.157.147.136]:44930 "EHLO lucky1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751091AbcINBvU (ORCPT ); Tue, 13 Sep 2016 21:51:20 -0400 Received: from shawn.lin?rock-chips.com (unknown [192.168.167.129]) by lucky1.263xmail.com (Postfix) with ESMTP id 11E4BDB; Wed, 14 Sep 2016 09:51:14 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 1 X-MAIL-DELIVERY: 0 X-KSVirus-check: 0 X-ABS-CHECKED: 4 X-ADDR-CHECKED4: 1 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.263.net (Postfix) with ESMTP id DC66438A; Wed, 14 Sep 2016 09:51:13 +0800 (CST) X-RL-SENDER: shawn.lin@rock-chips.com X-FST-TO: ulf.hansson@linaro.org X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: shawn.lin@rock-chips.com X-UNIQUE-TAG: <5aa7a6c2969d66a82bc8050a3bd7a236> X-ATTACHMENT-NUM: 0 X-SENDER: lintao@rock-chips.com X-DNS-TYPE: 0 Received: from localhost.localdomain (unknown [58.22.7.114]) by smtp.263.net (Postfix) whith ESMTP id 287936WC1U1; Wed, 14 Sep 2016 09:51:14 +0800 (CST) From: Shawn Lin To: Ulf Hansson Cc: Jaehoon Chung , linux-mmc@vger.kernel.org, Shawn Lin Subject: [RESEND PATCH v2 1/2] mmc: core: move freqs table into core.h Date: Wed, 14 Sep 2016 09:51:07 +0800 Message-Id: <1473817868-27812-1-git-send-email-shawn.lin@rock-chips.com> X-Mailer: git-send-email 1.8.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We will reuse it outside the core.c file, so let's move it to the header file. Signed-off-by: Shawn Lin --- Changes in v2: None drivers/mmc/core/core.c | 2 -- drivers/mmc/core/core.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index f0ed0af..13d0fb8 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -61,8 +61,6 @@ /* The max erase timeout, used when host->max_busy_timeout isn't specified */ #define MMC_ERASE_TIMEOUT_MS (60 * 1000) /* 60 s */ -static const unsigned freqs[] = { 400000, 300000, 200000, 100000 }; - /* * Enabling software CRCs on the data blocks can be a significant (30%) * performance cost, and for other reasons may not always be desired. diff --git a/drivers/mmc/core/core.h b/drivers/mmc/core/core.h index 0fa86a2..5456000 100644 --- a/drivers/mmc/core/core.h +++ b/drivers/mmc/core/core.h @@ -54,6 +54,8 @@ void mmc_power_off(struct mmc_host *host); void mmc_power_cycle(struct mmc_host *host, u32 ocr); void mmc_set_initial_state(struct mmc_host *host); +static const unsigned int freqs[] = { 400000, 300000, 200000, 100000 }; + static inline void mmc_delay(unsigned int ms) { if (ms < 1000 / HZ) {