Skip to content

Commit

Permalink
[EISA] EISA registration with !CONFIG_EISA
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Maciej W. Rozycki authored and Ralf Baechle committed Feb 9, 2007
1 parent 9084b00 commit f85da08
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions include/linux/eisa.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit f85da08

Please sign in to comment.