summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-msm
diff options
context:
space:
mode:
authorJosh Cartwright <joshc@codeaurora.org>2013-12-20 11:09:14 -0800
committerOlof Johansson <olof@lixom.net>2014-01-02 10:16:56 -0800
commitc4b4ecbda50379b587ccff81663f3235582e5c66 (patch)
treedaa41f4d6ad01d24c0f3a2c0406aba5db6779c5c /arch/arm/mach-msm
parent374b105797c3d4f29c685f3be535c35f5689b30e (diff)
downloadop-kernel-dev-c4b4ecbda50379b587ccff81663f3235582e5c66.zip
op-kernel-dev-c4b4ecbda50379b587ccff81663f3235582e5c66.tar.gz
ARM: msm: trout: fix uninit var warning
Fix the following warning when !CONFIG_MMC: arch/arm/mach-msm/board-trout.c: In function 'trout_init': arch/arm/mach-msm/board-trout.c:67:6: warning: unused variable 'rc' [-Wunused-variable] int rc; ^ Also, while we're here, rework explicit printk(KERN_CRIT..) to use pr_crit. Signed-off-by: Josh Cartwright <joshc@codeaurora.org> Signed-off-by: David Brown <davidb@codeaurora.org> Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-msm')
-rw-r--r--arch/arm/mach-msm/board-trout.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/arm/mach-msm/board-trout.c b/arch/arm/mach-msm/board-trout.c
index ccf6621..015d544 100644
--- a/arch/arm/mach-msm/board-trout.c
+++ b/arch/arm/mach-msm/board-trout.c
@@ -13,6 +13,7 @@
* GNU General Public License for more details.
*
*/
+#define pr_fmt(fmt) "%s: " fmt, __func__
#include <linux/kernel.h>
#include <linux/init.h>
@@ -68,12 +69,11 @@ static void __init trout_init(void)
platform_add_devices(devices, ARRAY_SIZE(devices));
-#ifdef CONFIG_MMC
- rc = trout_init_mmc(system_rev);
- if (rc)
- printk(KERN_CRIT "%s: MMC init failure (%d)\n", __func__, rc);
-#endif
-
+ if (IS_ENABLED(CONFIG_MMC)) {
+ rc = trout_init_mmc(system_rev);
+ if (rc)
+ pr_crit("MMC init failure (%d)\n", rc);
+ }
}
static struct map_desc trout_io_desc[] __initdata = {
OpenPOWER on IntegriCloud