From 1f05f0ca655a4d32de04cc7829e14552a56bcb04 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sun, 24 Oct 2010 11:12:28 -0200 Subject: [PATCH] --- yaml --- r: 217390 b: refs/heads/master c: 3c52cc57ccd5c99441368d5e66be36681ce90e72 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/edac/i7core_edac.c | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 3c1294589726..04bfc69cd69a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a3e1541637f2096ab31af311c53eaeb0853650d3 +refs/heads/master: 3c52cc57ccd5c99441368d5e66be36681ce90e72 diff --git a/trunk/drivers/edac/i7core_edac.c b/trunk/drivers/edac/i7core_edac.c index 71f4dc699abe..e3404b2bbaa2 100644 --- a/trunk/drivers/edac/i7core_edac.c +++ b/trunk/drivers/edac/i7core_edac.c @@ -353,6 +353,7 @@ static const struct pci_id_table pci_dev_table[] = { PCI_ID_TABLE_ENTRY(pci_dev_descr_i7core_nehalem), PCI_ID_TABLE_ENTRY(pci_dev_descr_lynnfield), PCI_ID_TABLE_ENTRY(pci_dev_descr_i7core_westmere), + {0,} /* 0 terminated list. */ }; /* @@ -1409,14 +1410,13 @@ static int i7core_get_onedevice(struct pci_dev **prev, static int i7core_get_all_devices(void) { - int i, j, rc, last_bus; + int i, rc, last_bus; struct pci_dev *pdev = NULL; - const struct pci_id_table *table; + const struct pci_id_table *table = pci_dev_table; last_bus = i7core_pci_lastbus(); - for (j = 0; j < ARRAY_SIZE(pci_dev_table); j++) { - table = &pci_dev_table[j]; + while (table && table->descr) { for (i = 0; i < table->n_devs; i++) { pdev = NULL; do { @@ -1432,6 +1432,7 @@ static int i7core_get_all_devices(void) } } while (pdev); } + table++; } return 0;