diff options
author | Maciej W. Rozycki <macro@linux-mips.org> | 2007-02-05 19:28:26 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-02-09 11:23:18 -0500 |
commit | f85da084151c9454891124c999006857a354622a (patch) | |
tree | 01cac9f3aa1242952649fd1d1849a8a5acd14c0e /include/linux | |
parent | 9084b0058e11378abb43d01e669bac8ac7b593ff (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')
-rw-r--r-- | include/linux/eisa.h | 10 |
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 | |||
64 | extern struct bus_type eisa_bus_type; | 67 | extern struct bus_type eisa_bus_type; |
65 | int eisa_driver_register (struct eisa_driver *edrv); | 68 | int eisa_driver_register (struct eisa_driver *edrv); |
66 | void eisa_driver_unregister (struct eisa_driver *edrv); | 69 | void eisa_driver_unregister (struct eisa_driver *edrv); |
67 | 70 | ||
71 | #else /* !CONFIG_EISA */ | ||
72 | |||
73 | static inline int eisa_driver_register (struct eisa_driver *edrv) { return 0; } | ||
74 | static inline void eisa_driver_unregister (struct eisa_driver *edrv) { } | ||
75 | |||
76 | #endif /* !CONFIG_EISA */ | ||
77 | |||
68 | /* Mimics pci.h... */ | 78 | /* Mimics pci.h... */ |
69 | static inline void *eisa_get_drvdata (struct eisa_device *edev) | 79 | static inline void *eisa_get_drvdata (struct eisa_device *edev) |
70 | { | 80 | { |