diff options
Diffstat (limited to 'drivers/edac')
-rw-r--r-- | drivers/edac/highbank_l2_edac.c | 18 | ||||
-rw-r--r-- | drivers/edac/highbank_mc_edac.c | 18 |
2 files changed, 20 insertions, 16 deletions
diff --git a/drivers/edac/highbank_l2_edac.c b/drivers/edac/highbank_l2_edac.c index c2bd8c6a4349..10d3d298b640 100644 --- a/drivers/edac/highbank_l2_edac.c +++ b/drivers/edac/highbank_l2_edac.c | |||
@@ -90,28 +90,30 @@ static int highbank_l2_err_probe(struct platform_device *pdev) | |||
90 | goto err; | 90 | goto err; |
91 | } | 91 | } |
92 | 92 | ||
93 | dci->mod_name = dev_name(&pdev->dev); | ||
94 | dci->dev_name = dev_name(&pdev->dev); | ||
95 | |||
96 | if (edac_device_add_device(dci)) | ||
97 | goto err; | ||
98 | |||
93 | drvdata->db_irq = platform_get_irq(pdev, 0); | 99 | drvdata->db_irq = platform_get_irq(pdev, 0); |
94 | res = devm_request_irq(&pdev->dev, drvdata->db_irq, | 100 | res = devm_request_irq(&pdev->dev, drvdata->db_irq, |
95 | highbank_l2_err_handler, | 101 | highbank_l2_err_handler, |
96 | 0, dev_name(&pdev->dev), dci); | 102 | 0, dev_name(&pdev->dev), dci); |
97 | if (res < 0) | 103 | if (res < 0) |
98 | goto err; | 104 | goto err2; |
99 | 105 | ||
100 | drvdata->sb_irq = platform_get_irq(pdev, 1); | 106 | drvdata->sb_irq = platform_get_irq(pdev, 1); |
101 | res = devm_request_irq(&pdev->dev, drvdata->sb_irq, | 107 | res = devm_request_irq(&pdev->dev, drvdata->sb_irq, |
102 | highbank_l2_err_handler, | 108 | highbank_l2_err_handler, |
103 | 0, dev_name(&pdev->dev), dci); | 109 | 0, dev_name(&pdev->dev), dci); |
104 | if (res < 0) | 110 | if (res < 0) |
105 | goto err; | 111 | goto err2; |
106 | |||
107 | dci->mod_name = dev_name(&pdev->dev); | ||
108 | dci->dev_name = dev_name(&pdev->dev); | ||
109 | |||
110 | if (edac_device_add_device(dci)) | ||
111 | goto err; | ||
112 | 112 | ||
113 | devres_close_group(&pdev->dev, NULL); | 113 | devres_close_group(&pdev->dev, NULL); |
114 | return 0; | 114 | return 0; |
115 | err2: | ||
116 | edac_device_del_device(&pdev->dev); | ||
115 | err: | 117 | err: |
116 | devres_release_group(&pdev->dev, NULL); | 118 | devres_release_group(&pdev->dev, NULL); |
117 | edac_device_free_ctl_info(dci); | 119 | edac_device_free_ctl_info(dci); |
diff --git a/drivers/edac/highbank_mc_edac.c b/drivers/edac/highbank_mc_edac.c index 4695dd2d71fd..7a78307588bc 100644 --- a/drivers/edac/highbank_mc_edac.c +++ b/drivers/edac/highbank_mc_edac.c | |||
@@ -189,14 +189,6 @@ static int highbank_mc_probe(struct platform_device *pdev) | |||
189 | goto err; | 189 | goto err; |
190 | } | 190 | } |
191 | 191 | ||
192 | irq = platform_get_irq(pdev, 0); | ||
193 | res = devm_request_irq(&pdev->dev, irq, highbank_mc_err_handler, | ||
194 | 0, dev_name(&pdev->dev), mci); | ||
195 | if (res < 0) { | ||
196 | dev_err(&pdev->dev, "Unable to request irq %d\n", irq); | ||
197 | goto err; | ||
198 | } | ||
199 | |||
200 | mci->mtype_cap = MEM_FLAG_DDR3; | 192 | mci->mtype_cap = MEM_FLAG_DDR3; |
201 | mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED; | 193 | mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED; |
202 | mci->edac_cap = EDAC_FLAG_SECDED; | 194 | mci->edac_cap = EDAC_FLAG_SECDED; |
@@ -217,10 +209,20 @@ static int highbank_mc_probe(struct platform_device *pdev) | |||
217 | if (res < 0) | 209 | if (res < 0) |
218 | goto err; | 210 | goto err; |
219 | 211 | ||
212 | irq = platform_get_irq(pdev, 0); | ||
213 | res = devm_request_irq(&pdev->dev, irq, highbank_mc_err_handler, | ||
214 | 0, dev_name(&pdev->dev), mci); | ||
215 | if (res < 0) { | ||
216 | dev_err(&pdev->dev, "Unable to request irq %d\n", irq); | ||
217 | goto err2; | ||
218 | } | ||
219 | |||
220 | highbank_mc_create_debugfs_nodes(mci); | 220 | highbank_mc_create_debugfs_nodes(mci); |
221 | 221 | ||
222 | devres_close_group(&pdev->dev, NULL); | 222 | devres_close_group(&pdev->dev, NULL); |
223 | return 0; | 223 | return 0; |
224 | err2: | ||
225 | edac_mc_del_mc(&pdev->dev); | ||
224 | err: | 226 | err: |
225 | devres_release_group(&pdev->dev, NULL); | 227 | devres_release_group(&pdev->dev, NULL); |
226 | edac_mc_free(mci); | 228 | edac_mc_free(mci); |