drivers/pci: Fix for debug builds without CONFIG_PCI_ENUM_ONLY
authorPhil Sutter <phil@nwl.cc>
Fri, 25 Dec 2015 13:41:17 +0000 (14:41 +0100)
committerStefan Roese <sr@denx.de>
Thu, 14 Jan 2016 13:08:59 +0000 (14:08 +0100)
The debug printing references bar_res, which exists only if
CONFIG_PCI_ENUM_ONLY is not defined. Therefore move it into the ifdef'd
area.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Acked-by: Stefan Roese <sr@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
drivers/pci/pci_auto_old.c

index 9126f78b890b199f6aab2c6ac0927160e49e7263..edc9a7b3c1704eb7d222a1c1ee6ce5fd3db55726 100644 (file)
@@ -101,11 +101,11 @@ void pciauto_setup_device(struct pci_controller *hose,
                                bar_res = prefetch;
                        else
                                bar_res = mem;
-#endif
 
                        debug("PCI Autoconfig: BAR %d, %s, size=0x%llx, ",
                              bar_nr, bar_res == prefetch ? "Prf" : "Mem",
                              (unsigned long long)bar_size);
+#endif
                }
 
 #ifndef CONFIG_PCI_ENUM_ONLY