summaryrefslogtreecommitdiff
path: root/drivers/edac
diff options
context:
space:
mode:
authorAristeu Rozanski <arozansk@redhat.com>2013-10-30 20:27:03 +0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2013-11-14 22:49:27 +0400
commit5153a0f94cde059a64338f87698dce5c8fa3df8b (patch)
treef1169aa7a08f73b945703717ee984a07d11c3f0f /drivers/edac
parentcc311991a7ac68b60df1bb5ec26e4978cf66f6b0 (diff)
downloadlinux-5153a0f94cde059a64338f87698dce5c8fa3df8b.tar.xz
sb_edac: enable multiple PCI id tables to be used
This is needed to allow separated PCI id tables for Sandy Bridge and Ivy Bridge. Signed-off-by: Aristeu Rozanski <arozansk@redhat.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/edac')
-rw-r--r--drivers/edac/sb_edac.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c
index 718f623f010f..8d53beeaa84e 100644
--- a/drivers/edac/sb_edac.c
+++ b/drivers/edac/sb_edac.c
@@ -1105,12 +1105,6 @@ static void sbridge_put_all_devices(void)
}
}
-/*
- * sbridge_get_all_devices Find and perform 'get' operation on the MCH's
- * device/functions we want to reference for this driver
- *
- * Need to 'get' device 16 func 1 and func 2
- */
static int sbridge_get_onedevice(struct pci_dev **prev,
u8 *num_mc,
const struct pci_id_table *table,
@@ -1212,11 +1206,21 @@ static int sbridge_get_onedevice(struct pci_dev **prev,
return 0;
}
-static int sbridge_get_all_devices(u8 *num_mc)
+/*
+ * sbridge_get_all_devices - Find and perform 'get' operation on the MCH's
+ * device/functions we want to reference for this driver.
+ * Need to 'get' device 16 func 1 and func 2.
+ * @num_mc: pointer to the memory controllers count, to be incremented in case
+ * of success.
+ * @table: model specific table
+ *
+ * returns 0 in case of success or error code
+ */
+static int sbridge_get_all_devices(u8 *num_mc,
+ const struct pci_id_table *table)
{
int i, rc;
struct pci_dev *pdev = NULL;
- const struct pci_id_table *table = pci_dev_descr_sbridge_table;
while (table && table->descr) {
for (i = 0; i < table->n_devs; i++) {
@@ -1736,7 +1740,7 @@ static int sbridge_probe(struct pci_dev *pdev, const struct pci_device_id *id)
}
probed++;
- rc = sbridge_get_all_devices(&num_mc);
+ rc = sbridge_get_all_devices(&num_mc, pci_dev_descr_sbridge_table);
if (unlikely(rc < 0))
goto fail0;
mc = 0;