diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-06-24 14:47:36 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-06-24 14:47:36 +0200 |
commit | eb2dc3e7ed87ef45dc2dafba22bbe7a3fd7ca388 (patch) | |
tree | a3b68a437030ee1447a73f1047da827ed77bd43d | |
parent | 670ad9fd106bdb02ba2045198fcaf89960d3ec40 (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.c | 5 |
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 */ |