summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <greg@kroah.com>2003-06-19 02:14:18 -0700
committerGreg Kroah-Hartman <greg@kroah.com>2003-06-19 02:14:18 -0700
commit6bc2700336a7ad2d9f87f477413bfcb83e992108 (patch)
tree8535a67376c55c8e7cdaf3e905b8f5094db4ed89 /drivers
parentf26ad85d7d3d5b3731263556de78cef53444b27d (diff)
[PATCH] PCI: rename pci_get_dev() and pci_put_dev() to pci_dev_get() and pci_dev_put()
This makes things more consistant with the other get and put functions in the driver code.
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pci/hotplug.c2
-rw-r--r--drivers/pci/pci-driver.c20
-rw-r--r--drivers/pci/probe.c2
-rw-r--r--drivers/pci/proc.c4
-rw-r--r--drivers/pci/search.c4
5 files changed, 16 insertions, 16 deletions
diff --git a/drivers/pci/hotplug.c b/drivers/pci/hotplug.c
index 81e4020be4b9..3b2ac2a8c080 100644
--- a/drivers/pci/hotplug.c
+++ b/drivers/pci/hotplug.c
@@ -188,7 +188,7 @@ static void pci_destroy_dev(struct pci_dev *dev)
spin_unlock(&pci_bus_lock);
pci_free_resources(dev);
- pci_put_dev(dev);
+ pci_dev_put(dev);
}
/**
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index dde99a9f3e3d..d7f601cdde3f 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -138,10 +138,10 @@ static int pci_device_probe(struct device * dev)
drv = to_pci_driver(dev->driver);
pci_dev = to_pci_dev(dev);
- pci_get_dev(pci_dev);
+ pci_dev_get(pci_dev);
error = __pci_device_probe(drv, pci_dev);
if (error)
- pci_put_dev(pci_dev);
+ pci_dev_put(pci_dev);
return error;
}
@@ -156,7 +156,7 @@ static int pci_device_remove(struct device * dev)
drv->remove(pci_dev);
pci_dev->driver = NULL;
}
- pci_put_dev(pci_dev);
+ pci_dev_put(pci_dev);
return 0;
}
@@ -448,18 +448,18 @@ static int pci_bus_match(struct device * dev, struct device_driver * drv)
}
/**
- * pci_get_dev - increments the reference count of the pci device structure
+ * pci_dev_get - increments the reference count of the pci device structure
* @dev: the device being referenced
*
* Each live reference to a device should be refcounted.
*
* Drivers for PCI devices should normally record such references in
* their probe() methods, when they bind to a device, and release
- * them by calling pci_put_dev(), in their disconnect() methods.
+ * them by calling pci_dev_put(), in their disconnect() methods.
*
* A pointer to the device with the incremented reference counter is returned.
*/
-struct pci_dev *pci_get_dev (struct pci_dev *dev)
+struct pci_dev *pci_dev_get(struct pci_dev *dev)
{
struct device *tmp;
@@ -474,13 +474,13 @@ struct pci_dev *pci_get_dev (struct pci_dev *dev)
}
/**
- * pci_put_dev - release a use of the pci device structure
+ * pci_dev_put - release a use of the pci device structure
* @dev: device that's been disconnected
*
* Must be called when a user of a device is finished with it. When the last
* user of the device calls this function, the memory of the device is freed.
*/
-void pci_put_dev(struct pci_dev *dev)
+void pci_dev_put(struct pci_dev *dev)
{
if (dev)
put_device(&dev->dev);
@@ -504,5 +504,5 @@ EXPORT_SYMBOL(pci_register_driver);
EXPORT_SYMBOL(pci_unregister_driver);
EXPORT_SYMBOL(pci_dev_driver);
EXPORT_SYMBOL(pci_bus_type);
-EXPORT_SYMBOL(pci_get_dev);
-EXPORT_SYMBOL(pci_put_dev);
+EXPORT_SYMBOL(pci_dev_get);
+EXPORT_SYMBOL(pci_dev_put);
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 42f8a6d92228..ee71590f89ca 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -524,7 +524,7 @@ pci_scan_device(struct pci_bus *bus, int devfn)
}
device_initialize(&dev->dev);
dev->dev.release = pci_release_dev;
- pci_get_dev(dev);
+ pci_dev_get(dev);
pci_name_device(dev);
diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c
index 4bc22bd29cce..95522e71f61e 100644
--- a/drivers/pci/proc.c
+++ b/drivers/pci/proc.c
@@ -334,7 +334,7 @@ static void pci_seq_stop(struct seq_file *m, void *v)
{
if (v) {
struct pci_dev *dev = v;
- pci_put_dev(dev);
+ pci_dev_put(dev);
}
}
@@ -471,7 +471,7 @@ static int show_dev_config(struct seq_file *m, void *v)
first_dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, NULL);
if (dev == first_dev)
seq_puts(m, "PCI devices found:\n");
- pci_put_dev(first_dev);
+ pci_dev_put(first_dev);
drv = pci_dev_driver(dev);
diff --git a/drivers/pci/search.c b/drivers/pci/search.c
index 604073295ec4..85c74126ee6a 100644
--- a/drivers/pci/search.c
+++ b/drivers/pci/search.c
@@ -205,8 +205,8 @@ pci_get_subsys(unsigned int vendor, unsigned int device,
}
dev = NULL;
exit:
- pci_put_dev(from);
- dev = pci_get_dev(dev);
+ pci_dev_put(from);
+ dev = pci_dev_get(dev);
spin_unlock(&pci_bus_lock);
return dev;
}