From 28fc64af63488d701184977481b263f31d856984 Mon Sep 17 00:00:00 2001 From: Shawn Lin Date: Wed, 15 Feb 2017 16:35:28 +0800 Subject: [PATCH] mmc: core: change quirks.c to be a header file Rename quirks.c to quirks.h, and include it for individual C files which need it. Signed-off-by: Shawn Lin Signed-off-by: Ulf Hansson --- 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} | 8 ++------ drivers/mmc/core/sdio.c | 1 + 6 files changed, 6 insertions(+), 9 deletions(-) rename drivers/mmc/core/{quirks.c => quirks.h} (90%) diff --git a/drivers/mmc/core/Makefile b/drivers/mmc/core/Makefile index 0f81464fa824..7e3ed1aeada2 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 cd909aecfded..6f3a5ff85590 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 95e8fc54eb21..f06cd91964ce 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 ad1089c713e5..f830970958e6 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 90% rename from drivers/mmc/core/quirks.c rename to drivers/mmc/core/quirks.h index bf25a9c88863..1e56ec4d4085 100644 --- a/drivers/mmc/core/quirks.c +++ b/drivers/mmc/core/quirks.h @@ -9,10 +9,6 @@ * */ -#include -#include -#include -#include #include #include "card.h" @@ -53,7 +49,8 @@ static const struct mmc_fixup mmc_fixup_methods[] = { END_FIXUP }; -void mmc_fixup_device(struct mmc_card *card, const struct mmc_fixup *table) +static inline 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 +79,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 a64a8709ec72..f092a55c5064 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" -- 2.20.1