diff options
author | Toshi Kani <toshi.kani@hpe.com> | 2017-08-23 16:54:46 -0600 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2017-09-25 12:55:59 +0200 |
commit | 3877c7d1e24c05eeb1c57ade04d2527d511f25a1 (patch) | |
tree | 942677a67fb7443cb727356d4e107e7b7a8a8733 /drivers/edac/edac_mc.h | |
parent | 5deed6b6a479ad5851d7ead6412dc6faa84a694e (diff) | |
download | linux-3877c7d1e24c05eeb1c57ade04d2527d511f25a1.tar.gz linux-3877c7d1e24c05eeb1c57ade04d2527d511f25a1.tar.bz2 linux-3877c7d1e24c05eeb1c57ade04d2527d511f25a1.zip |
EDAC: Add helper which returns the loaded platform driver
Only a single EDAC platform driver can be loaded. When ghes_edac is
enabled, an EDAC platform driver still attempts to register itself and
fails in edac_mc_add_mc().
Add edac_get_owner() so that EDAC platform drivers can check the owner
first.
Signed-off-by: Toshi Kani <toshi.kani@hpe.com>
Suggested-by: Borislav Petkov <bp@alien8.de>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Link: http://lkml.kernel.org/r/20170823225447.15608-5-toshi.kani@hpe.com
[ Massage commit message. ]
Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'drivers/edac/edac_mc.h')
-rw-r--r-- | drivers/edac/edac_mc.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/edac/edac_mc.h b/drivers/edac/edac_mc.h index 5357800e418d..4165e15995ad 100644 --- a/drivers/edac/edac_mc.h +++ b/drivers/edac/edac_mc.h @@ -128,6 +128,14 @@ struct mem_ctl_info *edac_mc_alloc(unsigned mc_num, unsigned sz_pvt); /** + * edac_get_owner - Return the owner's mod_name of EDAC MC + * + * Returns: + * Pointer to mod_name string when EDAC MC is owned. NULL otherwise. + */ +extern const char *edac_get_owner(void); + +/* * edac_mc_add_mc_with_groups() - Insert the @mci structure into the mci * global list and create sysfs entries associated with @mci structure. * |