Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

edac, highbank: Improve and unify naming

Assinging correct names of the 'hb_mc_edac' and 'hb_l2_edac' edac
modules for module, controller and device. Reported values for
Highbank in dmesg are now:

EDAC MC0: Giving out device to module hb_mc_edac controller
calxeda,hb-ddr-ctrl: DEV fff00000.memory-controller (INTERRUPT)

EDAC DEVICE0: Giving out device to module hb_l2_edac controller
calxeda,hb-sregs-l2-ecc: DEV fff3c200.sregs (INTERRUPT)

Signed-off-by: Robert Richter <robert.richter@linaro.org>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Robert Richter <rric@kernel.org>

authored by

Robert Richter and committed by
Robert Richter
41ec0e8d 0ec8579e

+13 -9
+10 -7
drivers/edac/highbank_l2_edac.c
··· 50 50 return IRQ_HANDLED; 51 51 } 52 52 53 + static const struct of_device_id hb_l2_err_of_match[] = { 54 + { .compatible = "calxeda,hb-sregs-l2-ecc", }, 55 + {}, 56 + }; 57 + MODULE_DEVICE_TABLE(of, hb_l2_err_of_match); 58 + 53 59 static int highbank_l2_err_probe(struct platform_device *pdev) 54 60 { 61 + const struct of_device_id *id; 55 62 struct edac_device_ctl_info *dci; 56 63 struct hb_l2_drvdata *drvdata; 57 64 struct resource *r; ··· 97 90 goto err; 98 91 } 99 92 100 - dci->mod_name = dev_name(&pdev->dev); 93 + id = of_match_device(hb_l2_err_of_match, &pdev->dev); 94 + dci->mod_name = pdev->dev.driver->name; 95 + dci->ctl_name = id ? id->compatible : "unknown"; 101 96 dci->dev_name = dev_name(&pdev->dev); 102 97 103 98 if (edac_device_add_device(dci)) ··· 137 128 edac_device_free_ctl_info(dci); 138 129 return 0; 139 130 } 140 - 141 - static const struct of_device_id hb_l2_err_of_match[] = { 142 - { .compatible = "calxeda,hb-sregs-l2-ecc", }, 143 - {}, 144 - }; 145 - MODULE_DEVICE_TABLE(of, hb_l2_err_of_match); 146 131 147 132 static struct platform_driver highbank_l2_edac_driver = { 148 133 .probe = highbank_l2_err_probe,
+3 -2
drivers/edac/highbank_mc_edac.c
··· 233 233 mci->mtype_cap = MEM_FLAG_DDR3; 234 234 mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED; 235 235 mci->edac_cap = EDAC_FLAG_SECDED; 236 - mci->mod_name = dev_name(&pdev->dev); 236 + mci->mod_name = pdev->dev.driver->name; 237 237 mci->mod_ver = "1"; 238 - mci->ctl_name = dev_name(&pdev->dev); 238 + mci->ctl_name = id->compatible; 239 + mci->dev_name = dev_name(&pdev->dev); 239 240 mci->scrub_mode = SCRUB_SW_SRC; 240 241 241 242 /* Only a single 4GB DIMM is supported */