From ca0907b9e413bb1d1f3ea123b663535b74928846 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 2 May 2012 14:37:00 -0300 Subject: edac: Remove the legacy EDAC ABI Now that all drivers got converted to use the new ABI, we can drop the old one. Acked-by: Chris Metcalf Signed-off-by: Mauro Carvalho Chehab --- drivers/edac/edac_mc.c | 52 ++++++-------------------------------------------- 1 file changed, 6 insertions(+), 46 deletions(-) (limited to 'drivers/edac/edac_mc.c') diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c index 1bd237ee4ca7..06028de5fe1b 100644 --- a/drivers/edac/edac_mc.c +++ b/drivers/edac/edac_mc.c @@ -195,13 +195,13 @@ void *edac_align_ptr(void **p, unsigned size, int n_elems) * on such scenarios, as grouping the multiple ranks require drivers change. * * Returns: - * NULL allocation failed - * struct mem_ctl_info pointer + * On failure: NULL + * On success: struct mem_ctl_info pointer */ -struct mem_ctl_info *new_edac_mc_alloc(unsigned mc_num, - unsigned n_layers, - struct edac_mc_layer *layers, - unsigned sz_pvt) +struct mem_ctl_info *edac_mc_alloc(unsigned mc_num, + unsigned n_layers, + struct edac_mc_layer *layers, + unsigned sz_pvt) { struct mem_ctl_info *mci; struct edac_mc_layer *layer; @@ -370,46 +370,6 @@ struct mem_ctl_info *new_edac_mc_alloc(unsigned mc_num, */ return mci; } -EXPORT_SYMBOL_GPL(new_edac_mc_alloc); - -/** - * edac_mc_alloc: Allocate and partially fill a struct mem_ctl_info structure - * @mc_num: Memory controller number - * @n_layers: Number of layers at the MC hierarchy - * layers: Describes each layer as seen by the Memory Controller - * @size_pvt: Size of private storage needed - * - * - * FIXME: drivers handle multi-rank memories in different ways: some - * drivers map multi-ranked DIMMs as one DIMM while others - * as several DIMMs. - * - * Everything is kmalloc'ed as one big chunk - more efficient. - * It can only be used if all structures have the same lifetime - otherwise - * you have to allocate and initialize your own structures. - * - * Use edac_mc_free() to free mc structures allocated by this function. - * - * Returns: - * On failure: NULL - * On success: struct mem_ctl_info pointer - */ - -struct mem_ctl_info *edac_mc_alloc(unsigned sz_pvt, unsigned nr_csrows, - unsigned nr_chans, int mc_num) -{ - unsigned n_layers = 2; - struct edac_mc_layer layers[n_layers]; - - layers[0].type = EDAC_MC_LAYER_CHIP_SELECT; - layers[0].size = nr_csrows; - layers[0].is_virt_csrow = true; - layers[1].type = EDAC_MC_LAYER_CHANNEL; - layers[1].size = nr_chans; - layers[1].is_virt_csrow = false; - - return new_edac_mc_alloc(mc_num, ARRAY_SIZE(layers), layers, sz_pvt); -} EXPORT_SYMBOL_GPL(edac_mc_alloc); /** -- cgit v1.2.3