From 9626f94d83eadcb569471d72ee4ce9f0fbb66379 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Sat, 4 Oct 2003 21:03:36 -0700 Subject: [PATCH] [PATCH] EISA_bus cleanup From: Marc Zyngier , Christoph Hellwig I'd like to kill willy's CONFIG_EISA_ALWAYS kludge. So make EISA_bus a variable always when CONFIG_EISA is set and initialize it to 1 for alpha. We probably want to do that only if the system actually supports eisa, but I keep the old behaviour for now. --- arch/alpha/Kconfig | 15 --------------- arch/alpha/kernel/setup.c | 6 ++++++ drivers/eisa/eisa-bus.c | 7 ++----- include/linux/eisa.h | 16 ++++++---------- 4 files changed, 14 insertions(+), 30 deletions(-) diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig index 9a985819b95e5..e7766d3ec6d8a 100644 --- a/arch/alpha/Kconfig +++ b/arch/alpha/Kconfig @@ -471,21 +471,6 @@ config EISA bool depends on ALPHA_GENERIC || ALPHA_JENSEN || ALPHA_ALCOR || ALPHA_MIKASA || ALPHA_SABLE || ALPHA_LYNX || ALPHA_NORITAKE || ALPHA_RAWHIDE default y - ---help--- - The Extended Industry Standard Architecture (EISA) bus was - developed as an open alternative to the IBM MicroChannel bus. - - The EISA bus provided some of the features of the IBM MicroChannel - bus while maintaining backward compatibility with cards made for - the older ISA bus. The EISA bus saw limited use between 1988 and - 1995 when it was made obsolete by the PCI bus. - - Say Y here if you are building a kernel for an EISA-based machine. - - Otherwise, say N. - -config EISA_ALWAYS - def_bool EISA config SMP bool "Symmetric multi-processing support" diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c index deb4a3bb130a0..eab5371047f43 100644 --- a/arch/alpha/kernel/setup.c +++ b/arch/alpha/kernel/setup.c @@ -33,6 +33,7 @@ #include #include #include +#include #ifdef CONFIG_MAGIC_SYSRQ #include #include @@ -680,6 +681,11 @@ setup_arch(char **cmdline_p) /* Default root filesystem to sda2. */ ROOT_DEV = Root_SDA2; +#ifdef CONFIG_EISA + /* FIXME: only set this when we actually have EISA in this box? */ + EISA_bus = 1; +#endif + /* * Check ASN in HWRPB for validity, report if bad. * FIXME: how was this failing? Should we trust it instead, diff --git a/drivers/eisa/eisa-bus.c b/drivers/eisa/eisa-bus.c index 89c64b01e8125..368001ad784c9 100644 --- a/drivers/eisa/eisa-bus.c +++ b/drivers/eisa/eisa-bus.c @@ -422,11 +422,8 @@ module_param_array(disable_dev, int, disable_dev_count, 0444); postcore_initcall (eisa_init); -#ifndef CONFIG_EISA_ALWAYS -int EISA_bus; -EXPORT_SYMBOL(EISA_bus); -#endif - +int EISA_bus; /* for legacy drivers */ +EXPORT_SYMBOL (EISA_bus); EXPORT_SYMBOL (eisa_bus_type); EXPORT_SYMBOL (eisa_driver_register); EXPORT_SYMBOL (eisa_driver_unregister); diff --git a/include/linux/eisa.h b/include/linux/eisa.h index dc76d57b10d0b..4079242dced87 100644 --- a/include/linux/eisa.h +++ b/include/linux/eisa.h @@ -4,16 +4,6 @@ #include #include -#ifdef CONFIG_EISA -# ifdef CONFIG_EISA_ALWAYS -# define EISA_bus 1 -# else - extern int EISA_bus; -# endif -#else -# define EISA_bus 0 -#endif - #define EISA_SIG_LEN 8 #define EISA_MAX_SLOTS 8 @@ -108,4 +98,10 @@ struct eisa_root_device { int eisa_root_register (struct eisa_root_device *root); +#ifdef CONFIG_EISA +extern int EISA_bus; +#else +# define EISA_bus 0 +#endif + #endif -- 2.53.0