From: Geert Uytterhoeven <geert@linux-m68k.org>
To: linux-m68k@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
Michael Schmitz <schmitz@biophys.uni-duesseldorf.de>
Subject: [PATCH] m68k: atari_scc - kill fake config variables
Date: Fri, 2 Jan 2009 11:41:32 +0100 [thread overview]
Message-ID: <1230892892-25751-20-git-send-email-geert@linux-m68k.org> (raw)
In-Reply-To: <1230892892-25751-19-git-send-email-geert@linux-m68k.org>
Rename CONFIG_{TT,FALCON,ST}_SCC to SUPPORT_{TT,FALCON,ST}_SCC and reduce ifdef
clutter
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Michael Schmitz <schmitz@biophys.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
prev parent reply other threads:[~2009-01-02 10:41 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-02 10:41 [PATCH] m68k: Atari SCC support for ST Geert Uytterhoeven
2009-01-02 10:41 ` [PATCH] m68k: amiga core - kill warn_unused_result warnings Geert Uytterhoeven
2009-01-02 10:41 ` [PATCH] m68k: apollo " Geert Uytterhoeven
2009-01-02 10:41 ` [PATCH] m68k: atari " Geert Uytterhoeven
2009-01-02 10:41 ` [PATCH] m68k: hp300 " Geert Uytterhoeven
2009-01-02 10:41 ` [PATCH] m68k: mac " Geert Uytterhoeven
2009-01-02 10:41 ` [PATCH] m68k: mvme147 " Geert Uytterhoeven
2009-01-02 10:41 ` [PATCH] m68k: sun3 " Geert Uytterhoeven
2009-01-02 10:41 ` [PATCH] m68k: atari_scc " Geert Uytterhoeven
2009-01-02 10:41 ` [PATCH] m68k: vme_scc " Geert Uytterhoeven
2009-01-02 10:41 ` [PATCH] m68k: ser_a2232 " Geert Uytterhoeven
2009-01-02 10:41 ` [PATCH] m68k: scsi " Geert Uytterhoeven
2009-01-02 10:41 ` [PATCH] m68k: atafb " Geert Uytterhoeven
2009-01-02 10:41 ` [PATCH] m68k: amiserial " Geert Uytterhoeven
2009-01-02 10:41 ` [PATCH] m68k: dio " Geert Uytterhoeven
2009-01-02 10:41 ` [PATCH] m68k: zorro " Geert Uytterhoeven
2009-01-02 10:41 ` [PATCH] m68k: dio - kill resource_size_t format warnings Geert Uytterhoeven
2009-01-02 10:41 ` [PATCH] m68k: zorro - use %pR to print resources Geert Uytterhoeven
2009-01-02 10:41 ` [PATCH] m68k: dmasound - kill warn_unused_result warnings Geert Uytterhoeven
2009-01-02 10:41 ` Geert Uytterhoeven [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1230892892-25751-20-git-send-email-geert@linux-m68k.org \
--to=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@vger.kernel.org \
--cc=schmitz@biophys.uni-duesseldorf.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox