aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firmware')
-rw-r--r--drivers/firmware/edd.c7
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)
669 struct edd_info *info = edd_dev_get_info(edev); 669 struct edd_info *info = edd_dev_get_info(edev);
670 670
671 if (edd_dev_is_type(edev, "PCI")) { 671 if (edd_dev_is_type(edev, "PCI")) {
672 return pci_find_slot(info->params.interface_path.pci.bus, 672 return pci_get_bus_and_slot(info->params.interface_path.pci.bus,
673 PCI_DEVFN(info->params.interface_path.pci.slot, 673 PCI_DEVFN(info->params.interface_path.pci.slot,
674 info->params.interface_path.pci. 674 info->params.interface_path.pci.
675 function)); 675 function));
@@ -682,9 +682,12 @@ edd_create_symlink_to_pcidev(struct edd_device *edev)
682{ 682{
683 683
684 struct pci_dev *pci_dev = edd_get_pci_dev(edev); 684 struct pci_dev *pci_dev = edd_get_pci_dev(edev);
685 int ret;
685 if (!pci_dev) 686 if (!pci_dev)
686 return 1; 687 return 1;
687 return sysfs_create_link(&edev->kobj,&pci_dev->dev.kobj,"pci_dev"); 688 ret = sysfs_create_link(&edev->kobj,&pci_dev->dev.kobj,"pci_dev");
689 pci_dev_put(pci_dev);
690 return ret;
688} 691}
689 692
690static inline void 693static inline void