Commit 1b28f22a authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

edd: switch to pci_get based API

Signed-off-by: default avatarAlan Cox <alan@redhat.com>
Cc: Matt Domsch <Matt_Domsch@dell.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent c1fbac44
...@@ -669,7 +669,7 @@ edd_get_pci_dev(struct edd_device *edev) ...@@ -669,7 +669,7 @@ edd_get_pci_dev(struct edd_device *edev)
struct edd_info *info = edd_dev_get_info(edev); struct edd_info *info = edd_dev_get_info(edev);
if (edd_dev_is_type(edev, "PCI")) { 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, PCI_DEVFN(info->params.interface_path.pci.slot,
info->params.interface_path.pci. info->params.interface_path.pci.
function)); function));
...@@ -682,9 +682,12 @@ edd_create_symlink_to_pcidev(struct edd_device *edev) ...@@ -682,9 +682,12 @@ edd_create_symlink_to_pcidev(struct edd_device *edev)
{ {
struct pci_dev *pci_dev = edd_get_pci_dev(edev); struct pci_dev *pci_dev = edd_get_pci_dev(edev);
int ret;
if (!pci_dev) if (!pci_dev)
return 1; 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 static inline void
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment