summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYongqiang Liu <liuyongqiang13@huawei.com>2021-04-01 13:15:33 +0000
committerSasha Levin <sashal@kernel.org>2021-06-30 08:48:11 -0400
commite296c88f07ea85d87c5381433cc5c1189c7e8c80 (patch)
tree8de74a89d75938f177151c91213ccc73c7a79dbc
parent0e280502be1b003c3483ae03fc60dea554fcfa82 (diff)
downloadlinux-stable-e296c88f07ea85d87c5381433cc5c1189c7e8c80.tar.gz
linux-stable-e296c88f07ea85d87c5381433cc5c1189c7e8c80.tar.bz2
linux-stable-e296c88f07ea85d87c5381433cc5c1189c7e8c80.zip
ARM: OMAP2+: Fix build warning when mmc_omap is not built
[ Upstream commit 040ab72ee10ea88e1883ad143b3e2b77596abc31 ] GCC reports the following warning with W=1: arch/arm/mach-omap2/board-n8x0.c:325:19: warning: variable 'index' set but not used [-Wunused-but-set-variable] 325 | int bit, *openp, index; | ^~~~~ Fix this by moving CONFIG_MMC_OMAP to cover the rest codes in the n8x0_mmc_callback(). Signed-off-by: Yongqiang Liu <liuyongqiang13@huawei.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--arch/arm/mach-omap2/board-n8x0.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index 75bc18646df6..902e9df9b8bb 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -325,6 +325,7 @@ static int n8x0_mmc_get_cover_state(struct device *dev, int slot)
static void n8x0_mmc_callback(void *data, u8 card_mask)
{
+#ifdef CONFIG_MMC_OMAP
int bit, *openp, index;
if (board_is_n800()) {
@@ -342,7 +343,6 @@ static void n8x0_mmc_callback(void *data, u8 card_mask)
else
*openp = 0;
-#ifdef CONFIG_MMC_OMAP
omap_mmc_notify_cover_event(mmc_device, index, *openp);
#else
pr_warn("MMC: notify cover event not available\n");