diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2007-07-15 23:40:02 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-16 09:05:42 -0700 |
commit | 1b28f22a87a5a2f0ab39f2549441bbe5eb2e369f (patch) | |
tree | effb6deed0633d277ac0a0f3a79e3a0cf58ca61a | |
parent | c1fbac447993b275f90e118826a5edca1ec508da (diff) |
edd: switch to pci_get based API
Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Matt Domsch <Matt_Domsch@dell.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | drivers/firmware/edd.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/firmware/edd.c b/drivers/firmware/edd.c index 15232271d848..0fb730ee1da8 100644 --- a/drivers/firmware/edd.c +++ b/drivers/firmware/edd.c @@ -669,7 +669,7 @@ edd_get_pci_dev(struct edd_device *edev) 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_bus_and_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 @@ edd_create_symlink_to_pcidev(struct edd_device *edev) { 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 |