mmc: tegra: treat compilation warning as error
schowdary [Tue, 24 Jul 2012 13:11:46 +0000 (18:11 +0530)]
- Add compilation flag to treat warning as error
- Modified sdhci-tegra.c to remove compile warning

bug 949219

Change-Id: I704ea95e3b8ca8862482b6793b71ca4e5114f832
Signed-off-by: schowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/118036
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

drivers/mmc/host/Makefile
drivers/mmc/host/sdhci-tegra.c

index f5ea51b..2f9d6f4 100644 (file)
@@ -48,6 +48,7 @@ obj-$(CONFIG_MMC_SDHCI_PLTFM)         += sdhci-pltfm.o
 obj-$(CONFIG_MMC_SDHCI_CNS3XXX)                += sdhci-cns3xxx.o
 obj-$(CONFIG_MMC_SDHCI_ESDHC_IMX)      += sdhci-esdhc-imx.o
 obj-$(CONFIG_MMC_SDHCI_DOVE)           += sdhci-dove.o
+CFLAGS_sdhci-tegra.o                    = -Werror
 obj-$(CONFIG_MMC_SDHCI_TEGRA)          += sdhci-tegra.o
 obj-$(CONFIG_MMC_SDHCI_OF_ESDHC)       += sdhci-of-esdhc.o
 obj-$(CONFIG_MMC_SDHCI_OF_HLWD)                += sdhci-of-hlwd.o
index 2ed4994..59c025a 100644 (file)
 
 static unsigned int tegra_sdhost_min_freq;
 static unsigned int tegra_sdhost_std_freq;
+
+#ifdef CONFIG_ARCH_TEGRA_3x_SOC
 static void tegra_3x_sdhci_set_card_clock(struct sdhci_host *sdhci, unsigned int clock);
 static void tegra3_sdhci_post_reset_init(struct sdhci_host *sdhci);
+#endif
 
+#ifndef CONFIG_ARCH_TEGRA_2x_SOC
 static unsigned int tegra3_sdhost_max_clk[4] = {
        208000000,      104000000,      208000000,      104000000 };
+#endif
 
 struct tegra_sdhci_hw_ops{
        /* Set the internal clk and card clk.*/
@@ -187,6 +192,7 @@ static unsigned int tegra_sdhci_get_ro(struct sdhci_host *sdhci)
        return gpio_get_value(plat->wp_gpio);
 }
 
+#ifdef CONFIG_ARCH_TEGRA_3x_SOC
 static void tegra3_sdhci_post_reset_init(struct sdhci_host *sdhci)
 {
        u16 misc_ctrl;
@@ -223,6 +229,7 @@ static void tegra3_sdhci_post_reset_init(struct sdhci_host *sdhci)
                SDHCI_VENDOR_MISC_CNTRL_ENABLE_SDR50_SUPPORT;
        sdhci_writew(sdhci, misc_ctrl, SDHCI_VENDOR_MISC_CNTRL);
 }
+#endif /*      #ifdef CONFIG_ARCH_TEGRA_3x_SOC */
 
 static int tegra_sdhci_set_uhs_signaling(struct sdhci_host *host,
                unsigned int uhs)
@@ -405,7 +412,7 @@ static void tegra_sdhci_set_clk_rate(struct sdhci_host *sdhci,
        clk_set_rate(pltfm_host->clk, clk_rate);
        sdhci->max_clk = clk_get_rate(pltfm_host->clk);
 }
-
+#ifdef CONFIG_ARCH_TEGRA_3x_SOC
 static void tegra_3x_sdhci_set_card_clock(struct sdhci_host *sdhci, unsigned int clock)
 {
        int div;
@@ -490,6 +497,7 @@ set_clk:
 out:
        sdhci->clock = clock;
 }
+#endif /*      #ifdef CONFIG_ARCH_TEGRA_3x_SOC */
 
 static void tegra_sdhci_set_clock(struct sdhci_host *sdhci, unsigned int clock)
 {