[PATCH] EDAC/highbank: Use of_device_get_match_data()

Rosen Penev <[email protected]> Tue, 28 Jul 2026 18:09:12 -0700
Newsgroups org.kernel.vger.linux-edac,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Use of_device_get_match_data() to retrieve the memory controller settings
instead of dereferencing match->data directly.

Keep the explicit OF match lookup because the driver still uses the
matched compatible string for the EDAC controller name.

Assisted-by: Codex:GPT-5.5
Signed-off-by: Rosen Penev <[email protected]>
---
 drivers/edac/highbank_mc_edac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/edac/highbank_mc_edac.c b/drivers/edac/highbank_mc_edac.c
index 68d16cc8298d..ee1f15fe6986 100644
--- a/drivers/edac/highbank_mc_edac.c
+++ b/drivers/edac/highbank_mc_edac.c
@@ -201,7 +201,7 @@ static int highbank_mc_probe(struct platform_device *pdev)
 		goto err;
 	}
 
-	settings = id->data;
+	settings = of_device_get_match_data(&pdev->dev);
 	drvdata->mc_err_base = base + settings->err_offset;
 	drvdata->mc_int_base = base + settings->int_offset;
 
-- 
2.55.0