summaryrefslogtreecommitdiffstats
path: root/drivers/edac/edac_mc.c
diff options
context:
space:
mode:
authorDave Jiang <djiang@mvista.com>2007-07-19 01:49:47 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-19 10:04:53 -0700
commitc4192705fec85219086231a1c0fa61e8776e2c3b (patch)
tree2ac7f03963fbc1bec8457a0f4a61adeb398a5df7 /drivers/edac/edac_mc.c
parent20bcb7a81dee21bfa3408f03f46b2891c9b5c84b (diff)
downloadlinux-stable-c4192705fec85219086231a1c0fa61e8776e2c3b.tar.gz
linux-stable-c4192705fec85219086231a1c0fa61e8776e2c3b.tar.bz2
linux-stable-c4192705fec85219086231a1c0fa61e8776e2c3b.zip
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)
fail0:
edac_printk(KERN_WARNING, EDAC_MC,
"%s (%s) %s %s already assigned %d\n", p->dev->bus_id,
- dev_name(p->dev), p->mod_name, p->ctl_name, p->mc_idx);
+ dev_name(mci), p->mod_name, p->ctl_name, p->mc_idx);
return 1;
fail1:
@@ -353,7 +353,7 @@ int edac_mc_add_mc(struct mem_ctl_info *mci, int mc_idx)
/* Report action taken */
edac_mc_printk(mci, KERN_INFO, "Giving out device to %s %s: DEV %s\n",
- mci->mod_name, mci->ctl_name, dev_name(mci->dev));
+ mci->mod_name, mci->ctl_name, dev_name(mci));
mutex_unlock(&mem_ctls_mutex);
return 0;
@@ -391,7 +391,7 @@ struct mem_ctl_info * edac_mc_del_mc(struct device *dev)
mutex_unlock(&mem_ctls_mutex);
edac_printk(KERN_INFO, EDAC_MC,
"Removed device %d for %s %s: DEV %s\n", mci->mc_idx,
- mci->mod_name, mci->ctl_name, dev_name(mci->dev));
+ mci->mod_name, mci->ctl_name, dev_name(mci));
return mci;
}
EXPORT_SYMBOL_GPL(edac_mc_del_mc);