aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci-driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/pci-driver.c')
-rw-r--r--drivers/pci/pci-driver.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index 94e68c54d273..a9046d4b8af3 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -37,7 +37,7 @@ struct pci_dynid {
37 * Adds a new dynamic pci device ID to this driver, 37 * Adds a new dynamic pci device ID to this driver,
38 * and causes the driver to probe for all devices again. 38 * and causes the driver to probe for all devices again.
39 */ 39 */
40static inline ssize_t 40static ssize_t
41store_new_id(struct device_driver *driver, const char *buf, size_t count) 41store_new_id(struct device_driver *driver, const char *buf, size_t count)
42{ 42{
43 struct pci_dynid *dynid; 43 struct pci_dynid *dynid;
@@ -364,15 +364,16 @@ static struct kobj_type pci_driver_kobj_type = {
364}; 364};
365 365
366/** 366/**
367 * pci_register_driver - register a new pci driver 367 * __pci_register_driver - register a new pci driver
368 * @drv: the driver structure to register 368 * @drv: the driver structure to register
369 * @owner: owner module of drv
369 * 370 *
370 * Adds the driver structure to the list of registered drivers. 371 * Adds the driver structure to the list of registered drivers.
371 * Returns a negative value on error, otherwise 0. 372 * Returns a negative value on error, otherwise 0.
372 * If no error occurred, the driver remains registered even if 373 * If no error occurred, the driver remains registered even if
373 * no device was claimed during registration. 374 * no device was claimed during registration.
374 */ 375 */
375int pci_register_driver(struct pci_driver *drv) 376int __pci_register_driver(struct pci_driver *drv, struct module *owner)
376{ 377{
377 int error; 378 int error;
378 379
@@ -389,7 +390,7 @@ int pci_register_driver(struct pci_driver *drv)
389 printk(KERN_WARNING "Warning: PCI driver %s has a struct " 390 printk(KERN_WARNING "Warning: PCI driver %s has a struct "
390 "device_driver shutdown method, please update!\n", 391 "device_driver shutdown method, please update!\n",
391 drv->name); 392 drv->name);
392 drv->driver.owner = drv->owner; 393 drv->driver.owner = owner;
393 drv->driver.kobj.ktype = &pci_driver_kobj_type; 394 drv->driver.kobj.ktype = &pci_driver_kobj_type;
394 395
395 spin_lock_init(&drv->dynids.lock); 396 spin_lock_init(&drv->dynids.lock);
@@ -526,7 +527,7 @@ postcore_initcall(pci_driver_init);
526 527
527EXPORT_SYMBOL(pci_match_id); 528EXPORT_SYMBOL(pci_match_id);
528EXPORT_SYMBOL(pci_match_device); 529EXPORT_SYMBOL(pci_match_device);
529EXPORT_SYMBOL(pci_register_driver); 530EXPORT_SYMBOL(__pci_register_driver);
530EXPORT_SYMBOL(pci_unregister_driver); 531EXPORT_SYMBOL(pci_unregister_driver);
531EXPORT_SYMBOL(pci_dev_driver); 532EXPORT_SYMBOL(pci_dev_driver);
532EXPORT_SYMBOL(pci_bus_type); 533EXPORT_SYMBOL(pci_bus_type);