From patchwork Tue Feb 7 08:27:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Lin X-Patchwork-Id: 9559423 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 1978660434 for ; Tue, 7 Feb 2017 08:29:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0CDEA20246 for ; Tue, 7 Feb 2017 08:29:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 014FC26E1A; Tue, 7 Feb 2017 08:29:44 +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.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 E627B20246 for ; Tue, 7 Feb 2017 08:29:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752035AbdBGI3n (ORCPT ); Tue, 7 Feb 2017 03:29:43 -0500 Received: from lucky1.263xmail.com ([211.157.147.134]:34531 "EHLO lucky1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751450AbdBGI3m (ORCPT ); Tue, 7 Feb 2017 03:29:42 -0500 Received: from shawn.lin?rock-chips.com (unknown [192.168.167.78]) by lucky1.263xmail.com (Postfix) with ESMTP id 47606B93; Tue, 7 Feb 2017 16:29:37 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 1 X-MAIL-DELIVERY: 0 X-KSVirus-check: 0 X-ABS-CHECKED: 4 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.263.net (Postfix) with ESMTP id 47F6E395; Tue, 7 Feb 2017 16:29:37 +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: X-ATTACHMENT-NUM: 0 X-SENDER: lintao@rock-chips.com X-DNS-TYPE: 0 Received: from unknown (unknown [58.22.7.114]) by smtp.263.net (Postfix) whith SMTP id 32399R1JEY8; Tue, 07 Feb 2017 16:29:37 +0800 (CST) From: Shawn Lin To: Ulf Hansson Cc: linux-mmc@vger.kernel.org, Shawn Lin Subject: [PATCH 1/5] mmc: core: change quirks.c to be a header file Date: Tue, 7 Feb 2017 16:27:21 +0800 Message-Id: <1486456043-105954-2-git-send-email-shawn.lin@rock-chips.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1486456043-105954-1-git-send-email-shawn.lin@rock-chips.com> References: <1486456043-105954-1-git-send-email-shawn.lin@rock-chips.com> 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 Rename quirks.c to quirks.h, and include it for individual C files which need it. Signed-off-by: Shawn Lin --- drivers/mmc/core/Makefile | 2 +- drivers/mmc/core/block.c | 1 + drivers/mmc/core/card.h | 2 -- drivers/mmc/core/mmc.c | 1 + drivers/mmc/core/{quirks.c => quirks.h} | 4 ++-- drivers/mmc/core/sdio.c | 1 + 6 files changed, 6 insertions(+), 5 deletions(-) rename drivers/mmc/core/{quirks.c => quirks.h} (95%) diff --git a/drivers/mmc/core/Makefile b/drivers/mmc/core/Makefile index 0f81464..7e3ed1a 100644 --- a/drivers/mmc/core/Makefile +++ b/drivers/mmc/core/Makefile @@ -7,7 +7,7 @@ mmc_core-y := core.o bus.o host.o \ mmc.o mmc_ops.o sd.o sd_ops.o \ sdio.o sdio_ops.o sdio_bus.o \ sdio_cis.o sdio_io.o sdio_irq.o \ - quirks.o slot-gpio.o + slot-gpio.o mmc_core-$(CONFIG_OF) += pwrseq.o obj-$(CONFIG_PWRSEQ_SIMPLE) += pwrseq_simple.o obj-$(CONFIG_PWRSEQ_SD8787) += pwrseq_sd8787.o diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c index 985477c..ce5e2a2 100644 --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c @@ -52,6 +52,7 @@ #include "host.h" #include "bus.h" #include "mmc_ops.h" +#include "quirks.h" #include "sd_ops.h" MODULE_ALIAS("mmc:block"); diff --git a/drivers/mmc/core/card.h b/drivers/mmc/core/card.h index 95e8fc5..f06cd91 100644 --- a/drivers/mmc/core/card.h +++ b/drivers/mmc/core/card.h @@ -218,6 +218,4 @@ static inline int mmc_card_broken_hpi(const struct mmc_card *c) return c->quirks & MMC_QUIRK_BROKEN_HPI; } -void mmc_fixup_device(struct mmc_card *card, const struct mmc_fixup *table); - #endif diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index f1a451e..d0e6b6f 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -25,6 +25,7 @@ #include "host.h" #include "bus.h" #include "mmc_ops.h" +#include "quirks.h" #include "sd_ops.h" #define DEFAULT_CMD6_TIMEOUT_MS 500 diff --git a/drivers/mmc/core/quirks.c b/drivers/mmc/core/quirks.h similarity index 95% rename from drivers/mmc/core/quirks.c rename to drivers/mmc/core/quirks.h index bf25a9c..dee83e7 100644 --- a/drivers/mmc/core/quirks.c +++ b/drivers/mmc/core/quirks.h @@ -53,7 +53,8 @@ END_FIXUP }; -void mmc_fixup_device(struct mmc_card *card, const struct mmc_fixup *table) +static void mmc_fixup_device(struct mmc_card *card, + const struct mmc_fixup *table) { const struct mmc_fixup *f; u64 rev = cid_rev_card(card); @@ -82,4 +83,3 @@ void mmc_fixup_device(struct mmc_card *card, const struct mmc_fixup *table) } } } -EXPORT_SYMBOL(mmc_fixup_device); diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index a64a870..f092a55 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c @@ -23,6 +23,7 @@ #include "card.h" #include "host.h" #include "bus.h" +#include "quirks.h" #include "sd.h" #include "sdio_bus.h" #include "mmc_ops.h"