From d7fc9d77acb8651e5fcb77df71dfd11fcf1f08ba Mon Sep 17 00:00:00 2001 From: Yazen Ghannam Date: Fri, 27 Jan 2017 11:24:21 -0600 Subject: EDAC: Add routine to check if MC devices list is empty We need to know if any MC devices have been allocated. Signed-off-by: Yazen Ghannam Cc: linux-edac Link: http://lkml.kernel.org/r/1485537863-2707-7-git-send-email-Yazen.Ghannam@amd.com [ Prettify text. ] Signed-off-by: Borislav Petkov --- drivers/edac/edac_mc.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'drivers/edac/edac_mc.h') diff --git a/drivers/edac/edac_mc.h b/drivers/edac/edac_mc.h index 50fc1dc9c0d8..5357800e418d 100644 --- a/drivers/edac/edac_mc.h +++ b/drivers/edac/edac_mc.h @@ -148,6 +148,15 @@ extern int edac_mc_add_mc_with_groups(struct mem_ctl_info *mci, */ extern void edac_mc_free(struct mem_ctl_info *mci); +/** + * edac_has_mcs() - Check if any MCs have been allocated. + * + * Returns: + * True if MC instances have been registered successfully. + * False otherwise. + */ +extern bool edac_has_mcs(void); + /** * edac_mc_find() - Search for a mem_ctl_info structure whose index is @idx. * -- cgit v1.2.3-59-g8ed1b