summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2007-02-05 16:28:26 -0800
committerRalf Baechle <ralf@linux-mips.org>2007-02-09 16:23:18 +0000
commitf85da084151c9454891124c999006857a354622a (patch)
tree01cac9f3aa1242952649fd1d1849a8a5acd14c0e
parent9084b0058e11378abb43d01e669bac8ac7b593ff (diff)
downloadlinux-f85da084151c9454891124c999006857a354622a.tar.gz
linux-f85da084151c9454891124c999006857a354622a.tar.bz2
linux-f85da084151c9454891124c999006857a354622a.zip
[EISA] EISA registration with !CONFIG_EISA
This is a change for the EISA bus support to permit drivers to call un/registration functions even if EISA support has not been enabled. This is similar to what PCI (and now TC) does and reduces the need for #ifdef clutter. Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--include/linux/eisa.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/eisa.h b/include/linux/eisa.h
index 1ff7c1392525..fe806b6f030d 100644
--- a/include/linux/eisa.h
+++ b/include/linux/eisa.h
@@ -61,10 +61,20 @@ struct eisa_driver {
#define to_eisa_driver(drv) container_of(drv,struct eisa_driver, driver)
+/* These external functions are only available when EISA support is enabled. */
+#ifdef CONFIG_EISA
+
extern struct bus_type eisa_bus_type;
int eisa_driver_register (struct eisa_driver *edrv);
void eisa_driver_unregister (struct eisa_driver *edrv);
+#else /* !CONFIG_EISA */
+
+static inline int eisa_driver_register (struct eisa_driver *edrv) { return 0; }
+static inline void eisa_driver_unregister (struct eisa_driver *edrv) { }
+
+#endif /* !CONFIG_EISA */
+
/* Mimics pci.h... */
static inline void *eisa_get_drvdata (struct eisa_device *edev)
{