summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2013-06-24 14:47:36 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2013-06-24 14:47:36 +0200
commiteb2dc3e7ed87ef45dc2dafba22bbe7a3fd7ca388 (patch)
treea3b68a437030ee1447a73f1047da827ed77bd43d
parent670ad9fd106bdb02ba2045198fcaf89960d3ec40 (diff)
Fix printing ahci PCI dev and fun
* linux/dev/drivers/block/ahci.c (ahci_probe_dev): Compute `dev' and `fun' earlier so they can be printed.
-rw-r--r--linux/dev/drivers/block/ahci.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/linux/dev/drivers/block/ahci.c b/linux/dev/drivers/block/ahci.c
index dbc8fdb..ceded7c 100644
--- a/linux/dev/drivers/block/ahci.c
+++ b/linux/dev/drivers/block/ahci.c
@@ -745,6 +745,9 @@ static void ahci_probe_dev(unsigned char bus, unsigned char device)
unsigned bar;
unsigned char irq;
+ dev = PCI_SLOT(device);
+ fun = PCI_FUNC(device);
+
/* Get configuration */
if (pcibios_read_config_byte(bus, device, PCI_HEADER_TYPE, &hdrtype) != PCIBIOS_SUCCESSFUL) {
printk("ahci: %02u:%02u.%u: Can not read configuration", bus, dev, fun);
@@ -771,8 +774,6 @@ static void ahci_probe_dev(unsigned char bus, unsigned char device)
return;
}
- dev = PCI_SLOT(device);
- fun = PCI_FUNC(device);
printk("AHCI SATA %02u:%02u.%u BAR 0x%x IRQ %u\n", bus, dev, fun, bar, irq);
/* Map mmio */