Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 39897
b: refs/heads/master
c: 094ed76
h: refs/heads/master
i:
  39895: 1dfaa16
v: v3
  • Loading branch information
Alan Cox authored and Greg Kroah-Hartman committed Oct 18, 2006
1 parent 50d6380 commit 5de1e93
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0bed208efcb25bed4dc2026488a4417aa68e7c92
refs/heads/master: 094ed76e8988d46158b036ab150e0c22aff6db3a
11 changes: 8 additions & 3 deletions trunk/drivers/pci/hotplug/fakephp.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,9 @@ static void pci_rescan_slot(struct pci_dev *temp)

if (!pci_read_config_byte(temp, PCI_HEADER_TYPE, &hdr_type)) {
temp->hdr_type = hdr_type & 0x7f;
if (!pci_find_slot(bus->number, temp->devfn)) {
if ((dev = pci_get_slot(bus, temp->devfn)) != NULL)
pci_dev_put(dev);
else {
dev = pci_scan_single_device(bus, temp->devfn);
if (dev) {
dbg("New device on %s function %x:%x\n",
Expand All @@ -205,7 +207,9 @@ static void pci_rescan_slot(struct pci_dev *temp)
continue;
temp->hdr_type = hdr_type & 0x7f;

if (!pci_find_slot(bus->number, temp->devfn)) {
if ((dev = pci_get_slot(bus, temp->devfn)) != NULL)
pci_dev_put(dev);
else {
dev = pci_scan_single_device(bus, temp->devfn);
if (dev) {
dbg("New device on %s function %x:%x\n",
Expand Down Expand Up @@ -305,7 +309,7 @@ static int disable_slot(struct hotplug_slot *slot)
/* search for subfunctions and disable them first */
if (!(dslot->dev->devfn & 7)) {
for (func = 1; func < 8; func++) {
dev = pci_find_slot(dslot->dev->bus->number,
dev = pci_get_slot(dslot->dev->bus,
dslot->dev->devfn + func);
if (dev) {
hslot = get_slot_from_dev(dev);
Expand All @@ -315,6 +319,7 @@ static int disable_slot(struct hotplug_slot *slot)
err("Hotplug slot not found for subfunction of PCI device\n");
return -ENODEV;
}
pci_dev_put(dev);
} else
dbg("No device in slot found\n");
}
Expand Down

0 comments on commit 5de1e93

Please sign in to comment.