aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/highbank_l2_edac.c
diff options
context:
space:
mode:
authorRobert Richter <robert.richter@linaro.org>2013-10-10 12:23:38 -0400
committerRobert Richter <rric@kernel.org>2013-11-04 16:43:18 -0500
commita72b8859fd3941cc1d2940d5c43026d2c6fb959e (patch)
treed2ef84f8fc228330808958e001a694810ce579be /drivers/edac/highbank_l2_edac.c
parent959f58544b7f20c92d5eb43d1232c96c15c01bfb (diff)
edac, highbank: Fix interrupt setup of mem and l2 controller
Register and enable interrupts after the edac registration. Otherwise incomming ecc error interrupts lead to crashes during device setup. Fixing this in drivers for mc and l2. Signed-off-by: Robert Richter <robert.richter@linaro.org> Acked-by: Rob Herring <rob.herring@calxeda.com> Cc: stable <stable@vger.kernel.org> # 3.6+ Signed-off-by: Robert Richter <rric@kernel.org>
Diffstat (limited to 'drivers/edac/highbank_l2_edac.c')
-rw-r--r--drivers/edac/highbank_l2_edac.c18
1 files changed, 10 insertions, 8 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;
115err2:
116 edac_device_del_device(&pdev->dev);
115err: 117err:
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);