From: Frank Mori Hess Date: Mon, 4 Aug 2003 19:10:09 +0000 (+0000) Subject: added some 2.2 pci hotplug compat X-Git-Tag: r0_7_69~287 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f22ca555fbe4d6fd114c997d423d47b5da9c1bd7;p=comedi.git added some 2.2 pci hotplug compat --- diff --git a/include/linux/pci.h b/include/linux/pci.h index bbf1d33a..2517fdff 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -23,7 +23,21 @@ prefetch((x)->global_list.next)) #endif -#if LINUX_VERSION_CODE < 0x020300 /* XXX */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0) /* XXX */ + +struct pci_driver { + struct list_head node; + char *name; + const struct pci_device_id *id_table; /* must be non-NULL for probe to be called */ + int (*probe) (struct pci_dev *dev, const struct pci_device_id *id); /* New device inserted */ + void (*remove) (struct pci_dev *dev); /* Device removed (NULL if not a hot-plug capable driver) */ + int (*save_state) (struct pci_dev *dev, u32 state); /* Save Device Context */ + int (*suspend) (struct pci_dev *dev, u32 state); /* Device suspended */ + int (*resume) (struct pci_dev *dev); /* Device woken up */ + int (*enable_wake) (struct pci_dev *dev, u32 state, int enable); /* Enable wake event */ +}; +static inline int pci_module_init(struct pci_driver *drv) { return 0; } +static inline void pci_unregister_driver(struct pci_driver *) { return; } #define pci_for_each_dev(x) \ for((x)=pci_devices;(x);(x)=(x)->next)