diff options
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r-- | include/linux/pci.h | 13 |
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; | |||
236 | struct pci_driver { | 236 | struct 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 | |||
338 | struct pci_dev *pci_find_device_reverse (unsigned int vendor, unsigned int device, const struct pci_dev *from); | 337 | struct pci_dev *pci_find_device_reverse (unsigned int vendor, unsigned int device, const struct pci_dev *from); |
339 | struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn); | 338 | struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn); |
340 | int pci_find_capability (struct pci_dev *dev, int cap); | 339 | int pci_find_capability (struct pci_dev *dev, int cap); |
340 | int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap); | ||
341 | int pci_find_ext_capability (struct pci_dev *dev, int cap); | 341 | int pci_find_ext_capability (struct pci_dev *dev, int cap); |
342 | struct pci_bus * pci_find_next_bus(const struct pci_bus *from); | 342 | struct 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); |
433 | void pci_enable_bridges(struct pci_bus *bus); | 433 | void pci_enable_bridges(struct pci_bus *bus); |
434 | 434 | ||
435 | /* New-style probing supporting hot-pluggable devices */ | 435 | /* Proper probing supporting hot-pluggable devices */ |
436 | int pci_register_driver(struct pci_driver *); | 436 | int __pci_register_driver(struct pci_driver *, struct module *); |
437 | static inline int pci_register_driver(struct pci_driver *driver) | ||
438 | { | ||
439 | return __pci_register_driver(driver, THIS_MODULE); | ||
440 | } | ||
441 | |||
437 | void pci_unregister_driver(struct pci_driver *); | 442 | void pci_unregister_driver(struct pci_driver *); |
438 | void pci_remove_behind_bridge(struct pci_dev *); | 443 | void pci_remove_behind_bridge(struct pci_dev *); |
439 | struct pci_driver *pci_dev_driver(const struct pci_dev *); | 444 | struct 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; } | |||
547 | static inline void pci_disable_device(struct pci_dev *dev) { } | 552 | static inline void pci_disable_device(struct pci_dev *dev) { } |
548 | static inline int pci_set_dma_mask(struct pci_dev *dev, u64 mask) { return -EIO; } | 553 | static inline int pci_set_dma_mask(struct pci_dev *dev, u64 mask) { return -EIO; } |
549 | static inline int pci_assign_resource(struct pci_dev *dev, int i) { return -EBUSY;} | 554 | static inline int pci_assign_resource(struct pci_dev *dev, int i) { return -EBUSY;} |
555 | static inline int __pci_register_driver(struct pci_driver *drv, struct module *owner) { return 0;} | ||
550 | static inline int pci_register_driver(struct pci_driver *drv) { return 0;} | 556 | static inline int pci_register_driver(struct pci_driver *drv) { return 0;} |
551 | static inline void pci_unregister_driver(struct pci_driver *drv) { } | 557 | static inline void pci_unregister_driver(struct pci_driver *drv) { } |
552 | static inline int pci_find_capability (struct pci_dev *dev, int cap) {return 0; } | 558 | static inline int pci_find_capability (struct pci_dev *dev, int cap) {return 0; } |
559 | static inline int pci_find_next_capability (struct pci_dev *dev, u8 post, int cap) { return 0; } | ||
553 | static inline int pci_find_ext_capability (struct pci_dev *dev, int cap) {return 0; } | 560 | static inline int pci_find_ext_capability (struct pci_dev *dev, int cap) {return 0; } |
554 | static inline const struct pci_device_id *pci_match_device(const struct pci_device_id *ids, const struct pci_dev *dev) { return NULL; } | 561 | static inline const struct pci_device_id *pci_match_device(const struct pci_device_id *ids, const struct pci_dev *dev) { return NULL; } |
555 | 562 | ||