From eb2dc3e7ed87ef45dc2dafba22bbe7a3fd7ca388 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Mon, 24 Jun 2013 14:47:36 +0200 Subject: 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. --- linux/dev/drivers/block/ahci.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'linux') 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 */ -- cgit v1.2.3