aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pci.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r--include/linux/pci.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 3596ac94ecff..de690ca73d58 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -236,7 +236,6 @@ struct module;
236struct pci_driver { 236struct pci_driver {
237 struct list_head node; 237 struct list_head node;
238 char *name; 238 char *name;
239 struct module *owner;
240 const struct pci_device_id *id_table; /* must be non-NULL for probe to be called */ 239 const struct pci_device_id *id_table; /* must be non-NULL for probe to be called */
241 int (*probe) (struct pci_dev *dev, const struct pci_device_id *id); /* New device inserted */ 240 int (*probe) (struct pci_dev *dev, const struct pci_device_id *id); /* New device inserted */
242 void (*remove) (struct pci_dev *dev); /* Device removed (NULL if not a hot-plug capable driver) */ 241 void (*remove) (struct pci_dev *dev); /* Device removed (NULL if not a hot-plug capable driver) */
@@ -338,6 +337,7 @@ struct pci_dev *pci_find_device (unsigned int vendor, unsigned int device, const
338struct pci_dev *pci_find_device_reverse (unsigned int vendor, unsigned int device, const struct pci_dev *from); 337struct pci_dev *pci_find_device_reverse (unsigned int vendor, unsigned int device, const struct pci_dev *from);
339struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn); 338struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn);
340int pci_find_capability (struct pci_dev *dev, int cap); 339int pci_find_capability (struct pci_dev *dev, int cap);
340int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap);
341int pci_find_ext_capability (struct pci_dev *dev, int cap); 341int pci_find_ext_capability (struct pci_dev *dev, int cap);
342struct pci_bus * pci_find_next_bus(const struct pci_bus *from); 342struct pci_bus * pci_find_next_bus(const struct pci_bus *from);
343 343
@@ -432,8 +432,13 @@ int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res,
432 void *alignf_data); 432 void *alignf_data);
433void pci_enable_bridges(struct pci_bus *bus); 433void pci_enable_bridges(struct pci_bus *bus);
434 434
435/* New-style probing supporting hot-pluggable devices */ 435/* Proper probing supporting hot-pluggable devices */
436int pci_register_driver(struct pci_driver *); 436int __pci_register_driver(struct pci_driver *, struct module *);
437static inline int pci_register_driver(struct pci_driver *driver)
438{
439 return __pci_register_driver(driver, THIS_MODULE);
440}
441
437void pci_unregister_driver(struct pci_driver *); 442void pci_unregister_driver(struct pci_driver *);
438void pci_remove_behind_bridge(struct pci_dev *); 443void pci_remove_behind_bridge(struct pci_dev *);
439struct pci_driver *pci_dev_driver(const struct pci_dev *); 444struct pci_driver *pci_dev_driver(const struct pci_dev *);
@@ -547,9 +552,11 @@ static inline int pci_enable_device(struct pci_dev *dev) { return -EIO; }
547static inline void pci_disable_device(struct pci_dev *dev) { } 552static inline void pci_disable_device(struct pci_dev *dev) { }
548static inline int pci_set_dma_mask(struct pci_dev *dev, u64 mask) { return -EIO; } 553static inline int pci_set_dma_mask(struct pci_dev *dev, u64 mask) { return -EIO; }
549static inline int pci_assign_resource(struct pci_dev *dev, int i) { return -EBUSY;} 554static inline int pci_assign_resource(struct pci_dev *dev, int i) { return -EBUSY;}
555static inline int __pci_register_driver(struct pci_driver *drv, struct module *owner) { return 0;}
550static inline int pci_register_driver(struct pci_driver *drv) { return 0;} 556static inline int pci_register_driver(struct pci_driver *drv) { return 0;}
551static inline void pci_unregister_driver(struct pci_driver *drv) { } 557static inline void pci_unregister_driver(struct pci_driver *drv) { }
552static inline int pci_find_capability (struct pci_dev *dev, int cap) {return 0; } 558static inline int pci_find_capability (struct pci_dev *dev, int cap) {return 0; }
559static inline int pci_find_next_capability (struct pci_dev *dev, u8 post, int cap) { return 0; }
553static inline int pci_find_ext_capability (struct pci_dev *dev, int cap) {return 0; } 560static inline int pci_find_ext_capability (struct pci_dev *dev, int cap) {return 0; }
554static inline const struct pci_device_id *pci_match_device(const struct pci_device_id *ids, const struct pci_dev *dev) { return NULL; } 561static inline const struct pci_device_id *pci_match_device(const struct pci_device_id *ids, const struct pci_dev *dev) { return NULL; }
555 562