[PATCH -v3 33/47] PCI: Add debug print out for pci related dev release

From: Yinghai Lu
Date: Mon Mar 19 2012 - 01:58:52 EST


In some case, they could not be called because some users just use
get_device() without put device back.

Signed-off-by: Yinghai Lu <yinghai@xxxxxxxxxx>
---
drivers/pci/probe.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index a819e76..14f2e69 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -57,6 +57,7 @@ static void release_pcibus_dev(struct device *dev)

if (pci_bus->bridge)
put_device(pci_bus->bridge);
+ dev_printk(KERN_DEBUG, dev, "freeing pci_bus info\n");
pci_bus_remove_resources(pci_bus);
pci_release_bus_of_node(pci_bus);
kfree(pci_bus);
@@ -1259,6 +1260,7 @@ static void pci_release_dev(struct device *dev)
{
struct pci_dev *pci_dev;

+ dev_printk(KERN_DEBUG, dev, "freeing pci_dev info\n");
pci_dev = to_pci_dev(dev);
pci_release_capabilities(pci_dev);
pci_release_of_node(pci_dev);
@@ -1323,6 +1325,7 @@ static void pci_release_bus_bridge_dev(struct device *dev)
{
struct pci_host_bridge *bridge = to_pci_host_bridge(dev);

+ dev_printk(KERN_DEBUG, dev, "freeing pci_host_bridge info\n");
if (bridge->release_fn)
bridge->release_fn(bridge);

--
1.7.7

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/