summaryrefslogtreecommitdiff
path: root/drivers/pci_auto.c
diff options
context:
space:
mode:
authorEd Swarthout <Ed.Swarthout@freescale.com>2007-07-27 01:50:44 -0500
committerJon Loeliger <jdl@freescale.com>2007-08-10 11:09:00 -0500
commit936b3e69b667c3eb9a61ece4e78647d3fce9fc2a (patch)
tree03a0c6df622782501fcca248ce79b8d68cdf4d70 /drivers/pci_auto.c
parentcf0b185e58ca0aec8ae2b2a8804ec0ef58ee21d4 (diff)
pciauto_setup_device bars_num fix
Passing bars_num=0 to pciauto_setup_device should assign no bars. Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com> Acked-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com> Acked-by: Andy Fleming <afleming@freescale.com>
Diffstat (limited to 'drivers/pci_auto.c')
-rw-r--r--drivers/pci_auto.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci_auto.c b/drivers/pci_auto.c
index a3c609ba49..2378553be5 100644
--- a/drivers/pci_auto.c
+++ b/drivers/pci_auto.c
@@ -94,7 +94,7 @@ void pciauto_setup_device(struct pci_controller *hose,
pci_hose_read_config_dword(hose, dev, PCI_COMMAND, &cmdstat);
cmdstat = (cmdstat & ~(PCI_COMMAND_IO | PCI_COMMAND_MEMORY)) | PCI_COMMAND_MASTER;
- for (bar = PCI_BASE_ADDRESS_0; bar <= PCI_BASE_ADDRESS_0 + (bars_num*4); bar += 4) {
+ for (bar = PCI_BASE_ADDRESS_0; bar < PCI_BASE_ADDRESS_0 + (bars_num*4); bar += 4) {
/* Tickle the BAR and get the response */
pci_hose_write_config_dword(hose, dev, bar, 0xffffffff);
pci_hose_read_config_dword(hose, dev, bar, &bar_response);