summaryrefslogtreecommitdiffstats
path: root/include/linux/isapnp.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-02-16 01:07:24 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-02-16 01:07:24 +0000
commit95db6b748fc86297827fbd9c9ef174d491c9ad89 (patch)
tree27a92a942821cde1edda9a1b088718d436b3efe4 /include/linux/isapnp.h
parent45b27b0a0652331d104c953a5b192d843fff88f8 (diff)
Merge with Linux 2.3.40.
Diffstat (limited to 'include/linux/isapnp.h')
-rw-r--r--include/linux/isapnp.h40
1 files changed, 26 insertions, 14 deletions
diff --git a/include/linux/isapnp.h b/include/linux/isapnp.h
index 66368dfcb..5a074285e 100644
--- a/include/linux/isapnp.h
+++ b/include/linux/isapnp.h
@@ -128,7 +128,9 @@ struct isapnp_resources {
struct isapnp_resources *next; /* next resource */
};
-#if defined(CONFIG_ISAPNP) || (defined(CONFIG_ISAPNP_MODULE) && defined(MODULE))
+#if defined(CONFIG_ISAPNP) || defined(CONFIG_ISAPNP_MODULE)
+
+#define __ISAPNP__
/* lowlevel configuration */
int isapnp_present(void);
@@ -146,6 +148,8 @@ void isapnp_activate(unsigned char device);
void isapnp_deactivate(unsigned char device);
void isapnp_fixup_device(struct pci_dev *dev);
void *isapnp_alloc(long size);
+int isapnp_proc_init(void);
+int isapnp_proc_done(void);
/* manager */
struct pci_bus *isapnp_find_card(unsigned short vendor,
unsigned short device,
@@ -161,6 +165,14 @@ void isapnp_resource_change(struct resource *resource,
/* init/main.c */
int isapnp_init(void);
+extern struct list_head isapnp_cards;
+extern struct list_head isapnp_devices;
+
+#define isapnp_for_each_card(card) \
+ for(card = pci_bus_b(isapnp_cards.next); card != pci_bus_b(&isapnp_cards); card = pci_bus_b(card->node.next))
+#define isapnp_for_each_dev(dev) \
+ for(dev = pci_dev_g(isapnp_devices.next); dev != pci_dev_g(&isapnp_devices); dev = pci_dev_g(dev->global_list.next))
+
#else /* !CONFIG_ISAPNP */
/* lowlevel configuration */
@@ -173,21 +185,21 @@ extern inline unsigned int isapnp_read_dword(unsigned char idx) { return 0xfffff
extern inline void isapnp_write_byte(unsigned char idx, unsigned char val) { ; }
extern inline void isapnp_write_word(unsigned char idx, unsigned short val) { ; }
extern inline void isapnp_write_dword(unsigned char idx, unsigned int val) { ; }
-extern void isapnp_wake(unsigned char csn) { ; }
-extern void isapnp_device(unsigned char device) { ; }
-extern void isapnp_activate(unsigned char device) { ; }
-extern void isapnp_deactivate(unsigned char device) { ; }
+extern inline void isapnp_wake(unsigned char csn) { ; }
+extern inline void isapnp_device(unsigned char device) { ; }
+extern inline void isapnp_activate(unsigned char device) { ; }
+extern inline void isapnp_deactivate(unsigned char device) { ; }
/* manager */
-extern struct pci_bus *isapnp_find_card(unsigned short vendor,
- unsigned short device,
- struct pci_bus *from) { return NULL; }
-extern struct pci_dev *isapnp_find_dev(struct pci_bus *card,
- unsigned short vendor,
- unsigned short function,
+extern inline struct pci_bus *isapnp_find_card(unsigned short vendor,
+ unsigned short device,
+ struct pci_bus *from) { return NULL; }
+extern inline struct pci_dev *isapnp_find_dev(struct pci_bus *card,
+ unsigned short vendor,
+ unsigned short function,
struct pci_dev *from) { return NULL; }
-extern void isapnp_resource_change(struct resource *resource,
- unsigned long start,
- unsigned long size) { ; }
+extern inline void isapnp_resource_change(struct resource *resource,
+ unsigned long start,
+ unsigned long size) { ; }
#endif /* CONFIG_ISAPNP */