Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: mt7621-mmc: Fix incompletely removed #if 0 block in sd.c

Commit 2a54e3259e2a ("staging: mt7621-mmc: Remove #if 0 blocks in sd.c")
does not completely remove an #if 0 block in sd.c. This causes the function
msdc_select_clksrc() which was eariler not compiled, to be compiled.
That causes an error - MSDC_CLKSRC_REG is not defined.

This patch completely removes the #if 0 block

Reported-by: NeilBrown <neil@brown.name>
Fixes: 2a54e3259e2a ("staging: mt7621-mmc: Remove #if 0 blocks in sd.c")
Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Nishad Kamdar and committed by
Greg Kroah-Hartman
e8940759 4cc357c5

-20
-20
drivers/staging/mt7621-mmc/sd.c
··· 217 217 spin_unlock(&host->lock); 218 218 } 219 219 220 - static void msdc_select_clksrc(struct msdc_host *host, unsigned char clksrc) 221 - { 222 - u32 val; 223 - 224 - BUG_ON(clksrc > 3); 225 - 226 - val = readl(host->base + MSDC_CLKSRC_REG); 227 - if (readl(host->base + MSDC_ECO_VER) >= 4) { 228 - val &= ~(0x3 << clk_src_bit[host->id]); 229 - val |= clksrc << clk_src_bit[host->id]; 230 - } else { 231 - val &= ~0x3; val |= clksrc; 232 - } 233 - writel(val, host->base + MSDC_CLKSRC_REG); 234 - 235 - host->hclk = hclks[clksrc]; 236 - host->hw->clk_src = clksrc; 237 - } 238 - #endif /* end of --- */ 239 - 240 220 static void msdc_set_mclk(struct msdc_host *host, int ddr, unsigned int hz) 241 221 { 242 222 //struct msdc_hw *hw = host->hw;