[5/6] mmc: mmci: Share sdmmc_variant_init() via the common header file

Message ID 20190306140456.28187-6-ulf.hansson@linaro.org
State New
Headers show
Series
  • mmc: mmci: Cleanup some variant related code
Related show

Commit Message

Ulf Hansson March 6, 2019, 2:04 p.m.
It's good practice to share functions via header files, rather than from
the c-files. Therefore, let's move sdmmc_variant_init() to mmci.h.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

---
 drivers/mmc/host/mmci.c | 6 ------
 drivers/mmc/host/mmci.h | 6 ++++++
 2 files changed, 6 insertions(+), 6 deletions(-)

-- 
2.17.1

Comments

Ludovic BARRE March 6, 2019, 3:23 p.m. | #1
On 3/6/19 3:04 PM, Ulf Hansson wrote:
> It's good practice to share functions via header files, rather than from

> the c-files. Therefore, let's move sdmmc_variant_init() to mmci.h.

> 

> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>


Acked-by: Ludovic Barre <ludovic.barre@st.com>

Tested-by: Ludovic Barre <ludovic.barre@st.com>


Regards,
Ludo

> ---

>   drivers/mmc/host/mmci.c | 6 ------

>   drivers/mmc/host/mmci.h | 6 ++++++

>   2 files changed, 6 insertions(+), 6 deletions(-)

> 

> diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c

> index e11fc5019535..2f3a1a7bd465 100644

> --- a/drivers/mmc/host/mmci.c

> +++ b/drivers/mmc/host/mmci.c

> @@ -52,12 +52,6 @@ void mmci_variant_init(struct mmci_host *host);

>   static inline void mmci_variant_init(struct mmci_host *host) {}

>   #endif

>   

> -#ifdef CONFIG_MMC_STM32_SDMMC

> -void sdmmc_variant_init(struct mmci_host *host);

> -#else

> -static inline void sdmmc_variant_init(struct mmci_host *host) {}

> -#endif

> -

>   static unsigned int fmax = 515633;

>   

>   static struct variant_data variant_arm = {

> diff --git a/drivers/mmc/host/mmci.h b/drivers/mmc/host/mmci.h

> index a76fe1085757..6bde28c9b302 100644

> --- a/drivers/mmc/host/mmci.h

> +++ b/drivers/mmc/host/mmci.h

> @@ -447,3 +447,9 @@ void qcom_variant_init(struct mmci_host *host);

>   #else

>   static inline void qcom_variant_init(struct mmci_host *host) {}

>   #endif

> +

> +#ifdef CONFIG_MMC_STM32_SDMMC

> +void sdmmc_variant_init(struct mmci_host *host);

> +#else

> +static inline void sdmmc_variant_init(struct mmci_host *host) {}

> +#endif

>

Patch

diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index e11fc5019535..2f3a1a7bd465 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -52,12 +52,6 @@  void mmci_variant_init(struct mmci_host *host);
 static inline void mmci_variant_init(struct mmci_host *host) {}
 #endif
 
-#ifdef CONFIG_MMC_STM32_SDMMC
-void sdmmc_variant_init(struct mmci_host *host);
-#else
-static inline void sdmmc_variant_init(struct mmci_host *host) {}
-#endif
-
 static unsigned int fmax = 515633;
 
 static struct variant_data variant_arm = {
diff --git a/drivers/mmc/host/mmci.h b/drivers/mmc/host/mmci.h
index a76fe1085757..6bde28c9b302 100644
--- a/drivers/mmc/host/mmci.h
+++ b/drivers/mmc/host/mmci.h
@@ -447,3 +447,9 @@  void qcom_variant_init(struct mmci_host *host);
 #else
 static inline void qcom_variant_init(struct mmci_host *host) {}
 #endif
+
+#ifdef CONFIG_MMC_STM32_SDMMC
+void sdmmc_variant_init(struct mmci_host *host);
+#else
+static inline void sdmmc_variant_init(struct mmci_host *host) {}
+#endif