From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PCI changes and fixes for 2.5.72
Date: Thu, 19 Jun 2003 16:39:33 -0700 [thread overview]
Message-ID: <1056065973528@kroah.com> (raw)
In-Reply-To: <10560659723370@kroah.com>
ChangeSet 1.1363, 2003/06/19 16:14:18-07:00, greg@kroah.com
[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.
drivers/pci/hotplug.c | 2 +-
drivers/pci/pci-driver.c | 20 ++++++++++----------
drivers/pci/probe.c | 2 +-
drivers/pci/proc.c | 4 ++--
drivers/pci/search.c | 4 ++--
include/linux/pci.h | 4 ++--
6 files changed, 18 insertions(+), 18 deletions(-)
diff -Nru a/drivers/pci/hotplug.c b/drivers/pci/hotplug.c
--- a/drivers/pci/hotplug.c Thu Jun 19 16:31:54 2003
+++ b/drivers/pci/hotplug.c Thu Jun 19 16:31:54 2003
@@ -188,7 +188,7 @@
spin_unlock(&pci_bus_lock);
pci_free_resources(dev);
- pci_put_dev(dev);
+ pci_dev_put(dev);
}
/**
diff -Nru a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
--- a/drivers/pci/pci-driver.c Thu Jun 19 16:31:54 2003
+++ b/drivers/pci/pci-driver.c Thu Jun 19 16:31:54 2003
@@ -138,10 +138,10 @@
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 @@
drv->remove(pci_dev);
pci_dev->driver = NULL;
}
- pci_put_dev(pci_dev);
+ pci_dev_put(pci_dev);
return 0;
}
@@ -448,18 +448,18 @@
}
/**
- * 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 @@
}
/**
- * 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_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 -Nru a/drivers/pci/probe.c b/drivers/pci/probe.c
--- a/drivers/pci/probe.c Thu Jun 19 16:31:54 2003
+++ b/drivers/pci/probe.c Thu Jun 19 16:31:54 2003
@@ -524,7 +524,7 @@
}
device_initialize(&dev->dev);
dev->dev.release = pci_release_dev;
- pci_get_dev(dev);
+ pci_dev_get(dev);
pci_name_device(dev);
diff -Nru a/drivers/pci/proc.c b/drivers/pci/proc.c
--- a/drivers/pci/proc.c Thu Jun 19 16:31:54 2003
+++ b/drivers/pci/proc.c Thu Jun 19 16:31:54 2003
@@ -334,7 +334,7 @@
{
if (v) {
struct pci_dev *dev = v;
- pci_put_dev(dev);
+ pci_dev_put(dev);
}
}
@@ -471,7 +471,7 @@
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 -Nru a/drivers/pci/search.c b/drivers/pci/search.c
--- a/drivers/pci/search.c Thu Jun 19 16:31:54 2003
+++ b/drivers/pci/search.c Thu Jun 19 16:31:54 2003
@@ -205,8 +205,8 @@
}
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;
}
diff -Nru a/include/linux/pci.h b/include/linux/pci.h
--- a/include/linux/pci.h Thu Jun 19 16:31:54 2003
+++ b/include/linux/pci.h Thu Jun 19 16:31:54 2003
@@ -556,8 +556,8 @@
void pci_read_bridge_bases(struct pci_bus *child);
struct resource *pci_find_parent_resource(const struct pci_dev *dev, struct resource *res);
int pci_get_interrupt_pin(struct pci_dev *dev, struct pci_dev **bridge);
-extern struct pci_dev *pci_get_dev(struct pci_dev *dev);
-extern void pci_put_dev(struct pci_dev *dev);
+extern struct pci_dev *pci_dev_get(struct pci_dev *dev);
+extern void pci_dev_put(struct pci_dev *dev);
extern void pci_remove_bus_device(struct pci_dev *dev);
next prev parent reply other threads:[~2003-06-19 23:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-19 23:37 [BK PATCH] PCI changes and fixes for 2.5.72 Greg KH
2003-06-19 23:39 ` [PATCH] " Greg KH
2003-06-19 23:39 ` Greg KH
2003-06-19 23:39 ` Greg KH
2003-06-19 23:39 ` Greg KH
2003-06-19 23:39 ` Greg KH
2003-06-19 23:39 ` Greg KH
2003-06-19 23:39 ` Greg KH
2003-06-19 23:39 ` Greg KH [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-06-20 15:44 Albert Cahalan
2003-06-20 18:35 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1056065973528@kroah.com \
--to=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.