aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/edac_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/edac/edac_device.c')
-rw-r--r--drivers/edac/edac_device.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/drivers/edac/edac_device.c b/drivers/edac/edac_device.c
index c559bf543422..63372fa7ecfe 100644
--- a/drivers/edac/edac_device.c
+++ b/drivers/edac/edac_device.c
@@ -375,37 +375,6 @@ static void del_edac_device_from_global_list(struct edac_device_ctl_info
375 wait_for_completion(&edac_device->removal_complete); 375 wait_for_completion(&edac_device->removal_complete);
376} 376}
377 377
378/**
379 * edac_device_find
380 * Search for a edac_device_ctl_info structure whose index is 'idx'.
381 *
382 * If found, return a pointer to the structure.
383 * Else return NULL.
384 *
385 * Caller must hold device_ctls_mutex.
386 */
387struct edac_device_ctl_info *edac_device_find(int idx)
388{
389 struct list_head *item;
390 struct edac_device_ctl_info *edac_dev;
391
392 /* Iterate over list, looking for exact match of ID */
393 list_for_each(item, &edac_device_list) {
394 edac_dev = list_entry(item, struct edac_device_ctl_info, link);
395
396 if (edac_dev->dev_idx >= idx) {
397 if (edac_dev->dev_idx == idx)
398 return edac_dev;
399
400 /* not on list, so terminate early */
401 break;
402 }
403 }
404
405 return NULL;
406}
407EXPORT_SYMBOL_GPL(edac_device_find);
408
409/* 378/*
410 * edac_device_workq_function 379 * edac_device_workq_function
411 * performs the operation scheduled by a workq request 380 * performs the operation scheduled by a workq request