aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/edac_mc.c
diff options
context:
space:
mode:
authorDave Jiang <djiang@mvista.com>2007-07-19 04:49:47 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-19 13:04:53 -0400
commitc4192705fec85219086231a1c0fa61e8776e2c3b (patch)
tree2ac7f03963fbc1bec8457a0f4a61adeb398a5df7 /drivers/edac/edac_mc.c
parent20bcb7a81dee21bfa3408f03f46b2891c9b5c84b (diff)
drivers/edac: add dev_name getter function
Move dev_name() macro to a more generic interface since it's not possible to determine whether a device is pci, platform, or of_device easily. Now each low level driver sets the name into the control structure, and the EDAC core references the control structure for the information. Better abstraction. Signed-off-by: Dave Jiang <djiang@mvista.com> Signed-off-by: Douglas Thompson <dougthompson@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/edac/edac_mc.c')
-rw-r--r--drivers/edac/edac_mc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c
index 7c5fdd1ee972..d324e1eadd3c 100644
--- a/drivers/edac/edac_mc.c
+++ b/drivers/edac/edac_mc.c
@@ -248,7 +248,7 @@ static int add_mc_to_global_list (struct mem_ctl_info *mci)
248fail0: 248fail0:
249 edac_printk(KERN_WARNING, EDAC_MC, 249 edac_printk(KERN_WARNING, EDAC_MC,
250 "%s (%s) %s %s already assigned %d\n", p->dev->bus_id, 250 "%s (%s) %s %s already assigned %d\n", p->dev->bus_id,
251 dev_name(p->dev), p->mod_name, p->ctl_name, p->mc_idx); 251 dev_name(mci), p->mod_name, p->ctl_name, p->mc_idx);
252 return 1; 252 return 1;
253 253
254fail1: 254fail1:
@@ -353,7 +353,7 @@ int edac_mc_add_mc(struct mem_ctl_info *mci, int mc_idx)
353 353
354 /* Report action taken */ 354 /* Report action taken */
355 edac_mc_printk(mci, KERN_INFO, "Giving out device to %s %s: DEV %s\n", 355 edac_mc_printk(mci, KERN_INFO, "Giving out device to %s %s: DEV %s\n",
356 mci->mod_name, mci->ctl_name, dev_name(mci->dev)); 356 mci->mod_name, mci->ctl_name, dev_name(mci));
357 357
358 mutex_unlock(&mem_ctls_mutex); 358 mutex_unlock(&mem_ctls_mutex);
359 return 0; 359 return 0;
@@ -391,7 +391,7 @@ struct mem_ctl_info * edac_mc_del_mc(struct device *dev)
391 mutex_unlock(&mem_ctls_mutex); 391 mutex_unlock(&mem_ctls_mutex);
392 edac_printk(KERN_INFO, EDAC_MC, 392 edac_printk(KERN_INFO, EDAC_MC,
393 "Removed device %d for %s %s: DEV %s\n", mci->mc_idx, 393 "Removed device %d for %s %s: DEV %s\n", mci->mc_idx,
394 mci->mod_name, mci->ctl_name, dev_name(mci->dev)); 394 mci->mod_name, mci->ctl_name, dev_name(mci));
395 return mci; 395 return mci;
396} 396}
397EXPORT_SYMBOL_GPL(edac_mc_del_mc); 397EXPORT_SYMBOL_GPL(edac_mc_del_mc);