mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] edd: Switch to refcounting PCI APIs
@ 2007-04-23 13:52 Alan Cox
  2007-05-02  6:29 ` Andrew Morton
  0 siblings, 1 reply; 2+ messages in thread
From: Alan Cox @ 2007-04-23 13:52 UTC (permalink / raw)
  To: Matt_Domsch, linux-kernel

Signed-off-by: Alan Cox <alan@redhat.com>

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.21-rc6-mm1/drivers/firmware/edd.c linux-2.6.21-rc6-mm1/drivers/firmware/edd.c
--- linux.vanilla-2.6.21-rc6-mm1/drivers/firmware/edd.c	2007-04-12 14:14:43.000000000 +0100
+++ linux-2.6.21-rc6-mm1/drivers/firmware/edd.c	2007-04-23 11:50:57.185158272 +0100
@@ -669,7 +669,7 @@
 	struct edd_info *info = edd_dev_get_info(edev);
 
 	if (edd_dev_is_type(edev, "PCI")) {
-		return pci_find_slot(info->params.interface_path.pci.bus,
+		return pci_get_slot(info->params.interface_path.pci.bus,
 				     PCI_DEVFN(info->params.interface_path.pci.slot,
 					       info->params.interface_path.pci.
 					       function));
@@ -682,9 +682,12 @@
 {
 
 	struct pci_dev *pci_dev = edd_get_pci_dev(edev);
+	int ret;
 	if (!pci_dev)
 		return 1;
-	return sysfs_create_link(&edev->kobj,&pci_dev->dev.kobj,"pci_dev");
+	ret = sysfs_create_link(&edev->kobj,&pci_dev->dev.kobj,"pci_dev");
+	pci_dev_put(pci_dev);
+	return ret;
 }
 
 static inline void

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-05-02  6:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-23 13:52 [PATCH] edd: Switch to refcounting PCI APIs Alan Cox
2007-05-02  6:29 ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome