summaryrefslogtreecommitdiffstats
path: root/arch/m68k/platform/coldfire/m520x.c
diff options
context:
space:
mode:
authorSteven King <sfking@fdwdc.com>2014-05-14 19:07:55 +0200
committerGreg Ungerer <gerg@uclinux.org>2014-05-26 05:28:37 +0200
commit151d14f4ac5a02cc059cb05b2a2f27ec5b9d6831 (patch)
tree07b6a7e045ccef506f6034677aeecb23eb28a88f /arch/m68k/platform/coldfire/m520x.c
parentm68knommu: Fix the 5249/525x qspi base address. (diff)
downloadlinux-151d14f4ac5a02cc059cb05b2a2f27ec5b9d6831.tar.xz
linux-151d14f4ac5a02cc059cb05b2a2f27ec5b9d6831.zip
m68knommu: qspi declutter.
Move the check for the QSPI config option inside the function body. If the option is not enabled, the compiler will optimize away the empty function body so we can remove the other check for the config option. Signed-off-by: Steven King <sfking@fdwdc.com> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Diffstat (limited to 'arch/m68k/platform/coldfire/m520x.c')
-rw-r--r--arch/m68k/platform/coldfire/m520x.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/m68k/platform/coldfire/m520x.c b/arch/m68k/platform/coldfire/m520x.c
index ea1be0e98ad6..4040a3c93733 100644
--- a/arch/m68k/platform/coldfire/m520x.c
+++ b/arch/m68k/platform/coldfire/m520x.c
@@ -118,10 +118,9 @@ static void __init m520x_clk_init(void)
/***************************************************************************/
-#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
-
static void __init m520x_qspi_init(void)
{
+#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
u16 par;
/* setup Port QS for QSPI with gpio CS control */
writeb(0x3f, MCF_GPIO_PAR_QSPI);
@@ -129,9 +128,8 @@ static void __init m520x_qspi_init(void)
par = readw(MCF_GPIO_PAR_UART);
par &= 0x00ff;
writew(par, MCF_GPIO_PAR_UART);
-}
-
#endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */
+}
/***************************************************************************/
@@ -176,9 +174,7 @@ void __init config_BSP(char *commandp, int size)
m520x_clk_init();
m520x_uarts_init();
m520x_fec_init();
-#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI)
m520x_qspi_init();
-#endif
}
/***************************************************************************/