Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 61673
b: refs/heads/master
c: 5da0831
h: refs/heads/master
i:
  61671: dafd8e9
v: v3
  • Loading branch information
Douglas Thompson authored and Linus Torvalds committed Jul 19, 2007
1 parent e830748 commit 4c2b6ad
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8ca47e00690914a9e5e6c734baa37c829a2f2fa1
refs/heads/master: 5da0831c598f94582bce6bb0a55b8de2f9897cb1
28 changes: 28 additions & 0 deletions trunk/drivers/edac/edac_mc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1456,6 +1456,34 @@ static void del_mc_from_global_list(struct mem_ctl_info *mci)
wait_for_completion(&mci->complete);
}

/**
* edac_mc_find: Search for a mem_ctl_info structure whose index is 'idx'.
*
* If found, return a pointer to the structure.
* Else return NULL.
*
* Caller must hold mem_ctls_mutex.
*/
struct mem_ctl_info * edac_mc_find(int idx)
{
struct list_head *item;
struct mem_ctl_info *mci;

list_for_each(item, &mc_devices) {
mci = list_entry(item, struct mem_ctl_info, link);

if (mci->mc_idx >= idx) {
if (mci->mc_idx == idx)
return mci;

break;
}
}

return NULL;
}
EXPORT_SYMBOL(edac_mc_find);

/**
* edac_mc_add_mc: Insert the 'mci' structure into the mci global list and
* create sysfs entries associated with mci structure
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/edac/edac_mc.h
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ void edac_mc_dump_mci(struct mem_ctl_info *mci);
void edac_mc_dump_csrow(struct csrow_info *csrow);
#endif /* CONFIG_EDAC_DEBUG */

extern struct mem_ctl_info * edac_mc_find(int idx);
extern int edac_mc_add_mc(struct mem_ctl_info *mci,int mc_idx);
extern struct mem_ctl_info * edac_mc_del_mc(struct device *dev);
extern int edac_mc_find_csrow_by_page(struct mem_ctl_info *mci,
Expand Down

0 comments on commit 4c2b6ad

Please sign in to comment.