aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/eisa.h
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2007-02-05 19:28:26 -0500
committerRalf Baechle <ralf@linux-mips.org>2007-02-09 11:23:18 -0500
commitf85da084151c9454891124c999006857a354622a (patch)
tree01cac9f3aa1242952649fd1d1849a8a5acd14c0e /include/linux/eisa.h
parent9084b0058e11378abb43d01e669bac8ac7b593ff (diff)
[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>
Diffstat (limited to 'include/linux/eisa.h')
-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 {
61 61
62#define to_eisa_driver(drv) container_of(drv,struct eisa_driver, driver) 62#define to_eisa_driver(drv) container_of(drv,struct eisa_driver, driver)
63 63
64/* These external functions are only available when EISA support is enabled. */
65#ifdef CONFIG_EISA
66
64extern struct bus_type eisa_bus_type; 67extern struct bus_type eisa_bus_type;
65int eisa_driver_register (struct eisa_driver *edrv); 68int eisa_driver_register (struct eisa_driver *edrv);
66void eisa_driver_unregister (struct eisa_driver *edrv); 69void eisa_driver_unregister (struct eisa_driver *edrv);
67 70
71#else /* !CONFIG_EISA */
72
73static inline int eisa_driver_register (struct eisa_driver *edrv) { return 0; }
74static inline void eisa_driver_unregister (struct eisa_driver *edrv) { }
75
76#endif /* !CONFIG_EISA */
77
68/* Mimics pci.h... */ 78/* Mimics pci.h... */
69static inline void *eisa_get_drvdata (struct eisa_device *edev) 79static inline void *eisa_get_drvdata (struct eisa_device *edev)
70{ 80{