ARM: OMAP2+: Fix build warning when mmc_omap is not built
authorYongqiang Liu <liuyongqiang13@huawei.com>
Thu, 1 Apr 2021 13:15:33 +0000 (13:15 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Jun 2021 08:00:04 +0000 (10:00 +0200)
commit864b5a8d5390765ddb8e82b86b111de86868d65f
tree18f0e0b6f405388b3f8461bd1d62d502da307353
parent247ec8ee0bf2d89b7075c11d9d40563d2fb0a92c
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>
arch/arm/mach-omap2/board-n8x0.c