All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shawn Lin <shawn.lin@rock-chips.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-mmc@vger.kernel.org, Shawn Lin <shawn.lin@rock-chips.com>
Subject: [PATCH v2 1/5] mmc: core: change quirks.c to be a header file
Date: Wed,  8 Feb 2017 09:15:42 +0800	[thread overview]
Message-ID: <1486516546-187771-2-git-send-email-shawn.lin@rock-chips.com> (raw)
In-Reply-To: <1486516546-187771-1-git-send-email-shawn.lin@rock-chips.com>

Rename quirks.c to quirks.h, and include it for
individual C files which need it.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>

---

Changes in v2:
- add __maybe_unused to make it cleanly compiled standalone
  suggested by Ulf
- add inline for mmc_fixup_device

 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..f3bbfcb7 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 inline void __maybe_unused
+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"
-- 
1.9.1



  reply	other threads:[~2017-02-08  1:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-08  1:15 [PATCH v2 0/5] Some small cleanup for quirks Shawn Lin
2017-02-08  1:15 ` Shawn Lin [this message]
2017-02-08 11:15   ` [PATCH v2 1/5] mmc: core: change quirks.c to be a header file Ulf Hansson
2017-02-10  9:41     ` Shawn Lin
2017-02-14  8:54       ` Ulf Hansson
2017-02-08  1:15 ` [PATCH v2 2/5] mmc: core: move some sdio IDs out of quirks file Shawn Lin
2017-02-08  1:15 ` [PATCH v2 3/5] mmc: core: improve the quirks for sdio devices Shawn Lin
2017-02-08  1:15 ` [PATCH v2 4/5] mmc: core: move all quirks together into quirks.h Shawn Lin
2017-02-08  1:22 ` [PATCH v2 5/5] mmc: core: add mmc prefix for blk_fixups Shawn Lin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1486516546-187771-2-git-send-email-shawn.lin@rock-chips.com \
    --to=shawn.lin@rock-chips.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.