Commit 3edc6373 authored by Ben Hutchings's avatar Ben Hutchings

PCI: quirks: Fix backport of quirk_io()

Commit 06cf35f9 ('PCI: Handle read-only BARs on AMD CS553x
devices') added the function quirk_io() which calls
pcibios_bus_to_resource().

Prior to Linux 3.14, pcibios_bus_to_resource() takes a pointer to
struct pci_dev and looks up the device's bus itself, so we need
to pass dev not dev->bus.
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent fd623507
......@@ -409,7 +409,7 @@ static void quirk_io(struct pci_dev *dev, int pos, unsigned size,
/* Convert from PCI bus to resource space */
bus_region.start = region;
bus_region.end = region + size - 1;
pcibios_bus_to_resource(dev->bus, res, &bus_region);
pcibios_bus_to_resource(dev, res, &bus_region);
dev_info(&dev->dev, FW_BUG "%s quirk: reg 0x%x: %pR\n",
name, PCI_BASE_ADDRESS_0 + (pos << 2), res);
......
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