[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1230892892-25751-20-git-send-email-geert@linux-m68k.org>
Date: Fri, 2 Jan 2009 11:41:32 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: linux-m68k@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Geert Uytterhoeven <geert@...ux-m68k.org>,
Michael Schmitz <schmitz@...phys.uni-duesseldorf.de>
Subject: [PATCH] m68k: atari_scc - kill fake config variables
Rename CONFIG_{TT,FALCON,ST}_SCC to SUPPORT_{TT,FALCON,ST}_SCC and reduce ifdef
clutter
Signed-off-by: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: Michael Schmitz <schmitz@...phys.uni-duesseldorf.de>
---
drivers/char/atari_scc.c | 39 ++++++++++++++++++++++++---------------
1 files changed, 24 insertions(+), 15 deletions(-)
diff --git a/drivers/char/atari_scc.c b/drivers/char/atari_scc.c
index 5dc59ff..fefff96 100644
--- a/drivers/char/atari_scc.c
+++ b/drivers/char/atari_scc.c
@@ -49,9 +49,9 @@
#include "scc.h"
-#define CONFIG_TT_SCC 1
-#define CONFIG_FALCON_SCC 1
-#define CONFIG_ST_SCC 1
+#define SUPPORT_TT_SCC 1
+#define SUPPORT_FALCON_SCC 1
+#define SUPPORT_ST_SCC 1
#define CHANNEL_A 0
#define CHANNEL_B 1
@@ -364,7 +364,7 @@ static void atari_scc_b_free_irqs(struct scc_port *port)
free_irq(IRQ_SCCB_SPCOND, port);
}
-#ifdef CONFIG_TT_SCC
+#ifdef SUPPORT_TT_SCC
static int atari_tt_scc_init(void)
{
struct scc_port *port;
@@ -464,10 +464,15 @@ static int atari_tt_scc_init(void)
return 0;
}
-#endif
+#else /* !SUPPORT_TT_SCC */
+static inline int atari_tt_scc_init(void)
+{
+ return -ENODEV;
+}
+#endif /* !SUPPORT_TT_SCC */
-#ifdef CONFIG_FALCON_SCC
+#ifdef SUPPORT_FALCON_SCC
static int atari_falcon_scc_init(void)
{
struct scc_port *port;
@@ -541,10 +546,15 @@ static int atari_falcon_scc_init(void)
return 0;
}
-#endif
+#else /* !SUPPORT_FALCON_SCC */
+static inline int atari_falcon_scc_init(void)
+{
+ return -ENODEV;
+}
+#endif /* !SUPPORT_FALCON_SCC */
-#ifdef CONFIG_ST_SCC
+#ifdef SUPPORT_ST_SCC
static int atari_st_scc_init(void)
{
struct scc_port *port;
@@ -618,7 +628,12 @@ static int atari_st_scc_init(void)
return 0;
}
-#endif
+#else /* !SUPPORT_ST_SCC */
+static inline int atari_st_scc_init(void)
+{
+ return -ENODEV;
+}
+#endif /* !SUPPORT_ST_SCC */
int atari_scc_init(void)
@@ -635,18 +650,12 @@ int atari_scc_init(void)
scc_del = &mfp.par_dt_reg;
-#ifdef CONFIG_TT_SCC
if (MACH_IS_TT)
res = atari_tt_scc_init();
-#endif
-#ifdef CONFIG_FALCON_SCC
if (MACH_IS_FALCON)
res = atari_falcon_scc_init();
-#endif
-#ifdef CONFIG_ST_SCC
if (MACH_IS_ST)
res = atari_st_scc_init();
-#endif
return res;
}
--
1.5.6.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists