From 1dc9b70d7d48abd8a5c6f83021f38992f3b5a77f Mon Sep 17 00:00:00 2001 From: Harry Ciao Date: Wed, 17 Jun 2009 16:27:59 -0700 Subject: edac: add edac_device_alloc_index() Add edac_device_alloc_index(), because for MAPLE platform there may exist several EDAC driver modules that could make use of edac_device_ctl_info structure at the same time. The index allocation for these structures should be taken care of by EDAC core. [akpm@linux-foundation.org: cleanups] Signed-off-by: Harry Ciao Cc: Doug Thompson Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Kumar Gala Cc: Paul Mackerras Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/edac/amd8111_edac.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/edac/amd8111_edac.c') diff --git a/drivers/edac/amd8111_edac.c b/drivers/edac/amd8111_edac.c index 2cb58ef743e0..35b78d04bbfa 100644 --- a/drivers/edac/amd8111_edac.c +++ b/drivers/edac/amd8111_edac.c @@ -37,7 +37,6 @@ #define AMD8111_EDAC_MOD_STR "amd8111_edac" #define PCI_DEVICE_ID_AMD_8111_PCI 0x7460 -static int edac_dev_idx; enum amd8111_edac_devs { LPC_BRIDGE = 0, @@ -377,7 +376,7 @@ static int amd8111_dev_probe(struct pci_dev *dev, * edac_device_ctl_info, but make use of existing * one instead. */ - dev_info->edac_idx = edac_dev_idx++; + dev_info->edac_idx = edac_device_alloc_index(); dev_info->edac_dev = edac_device_alloc_ctl_info(0, dev_info->ctl_name, 1, NULL, 0, 0, -- cgit v1.2.3