[PATCH] eisa.h - implement stub-functions if !CONFIG_EISA

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Implement stub-functions if !CONFIG_EISA.

Signed-off-by: Richard Knutsson <ricknu-0@xxxxxxxxxxxxxx>

---

To reduce the need for #ifdef CONFIG_EISA in drivers.
2.6.14-git8

diff -Narup a/include/linux/eisa.h b/include/linux/eisa.h
--- a/include/linux/eisa.h	2005-11-05 22:02:08.000000000 +0200
+++ b/include/linux/eisa.h	2005-11-06 00:49:38.000000000 +0100
@@ -68,8 +68,14 @@ struct eisa_driver {
#define to_eisa_driver(drv) container_of(drv,struct eisa_driver, driver)

extern struct bus_type eisa_bus_type;
+
+#ifdef CONFIG_EISA
int eisa_driver_register (struct eisa_driver *edrv);
void eisa_driver_unregister (struct eisa_driver *edrv);
+#else
+static inline int eisa_driver_register (struct eisa_driver *edrv) { return 0; }
+static inline void eisa_driver_unregister (struct eisa_driver *edrv) { }
+#endif

/* Mimics pci.h... */
static inline void *eisa_get_drvdata (struct eisa_device *edev)
@@ -96,7 +102,11 @@ struct eisa_root_device {
	struct resource  eisa_root_res;	/* ditto */
};

+#ifdef CONFIG_EISA
int eisa_root_register (struct eisa_root_device *root);
+#else
+static inline int eisa_root_register (struct eisa_root_device *root) { return 0; }
+#endif

#ifdef CONFIG_EISA
extern int EISA_bus;


-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux