edac: remove unneeded functions and add static accessor

Collection of patches, merged into one, from Adrian that do the following:

1) This patch makes the following needlessly global functions static:
- edac_pci_get_log_pe()
- edac_pci_get_log_npe()
- edac_pci_get_panic_on_pe()
- edac_pci_unregister_sysfs_instance_kobj()
- edac_pci_main_kobj_setup()

2) Remove unneeded function edac_device_find()

3) Added #if 0 around function  edac_pci_find()

4) make the needlessly global edac_pci_generic_check() static

5) Removed function edac_check_mc_devices()

Doug Thompson modified Adrian's patches, to bettern represent
the direction of EDAC, and make them one patch.

Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Doug Thompson <dougthompson@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Adrian Bunk
2008-04-29 01:03:18 -07:00
committed by Linus Torvalds
parent ff6ac2a616
commit 1a45027d1a
5 changed files with 11 additions and 59 deletions

View File

@@ -375,37 +375,6 @@ static void del_edac_device_from_global_list(struct edac_device_ctl_info
wait_for_completion(&edac_device->removal_complete);
}
/**
* edac_device_find
* Search for a edac_device_ctl_info structure whose index is 'idx'.
*
* If found, return a pointer to the structure.
* Else return NULL.
*
* Caller must hold device_ctls_mutex.
*/
struct edac_device_ctl_info *edac_device_find(int idx)
{
struct list_head *item;
struct edac_device_ctl_info *edac_dev;
/* Iterate over list, looking for exact match of ID */
list_for_each(item, &edac_device_list) {
edac_dev = list_entry(item, struct edac_device_ctl_info, link);
if (edac_dev->dev_idx >= idx) {
if (edac_dev->dev_idx == idx)
return edac_dev;
/* not on list, so terminate early */
break;
}
}
return NULL;
}
EXPORT_SYMBOL_GPL(edac_device_find);
/*
* edac_device_workq_function
* performs the operation scheduled by a workq request