Commit b48cc1d9 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Mark Brown

ASoC: fsi: Use of_device_get_match_data() helper

Use the of_device_get_match_data() helper instead of open coding.
Note that when used with DT, there's always a valid match.
Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 2bd6bf03
...@@ -1932,14 +1932,9 @@ static int fsi_probe(struct platform_device *pdev) ...@@ -1932,14 +1932,9 @@ static int fsi_probe(struct platform_device *pdev)
core = NULL; core = NULL;
if (np) { if (np) {
const struct of_device_id *of_id; core = of_device_get_match_data(&pdev->dev);
fsi_of_parse("fsia", np, &info.port_a, &pdev->dev);
of_id = of_match_device(fsi_of_match, &pdev->dev); fsi_of_parse("fsib", np, &info.port_b, &pdev->dev);
if (of_id) {
core = of_id->data;
fsi_of_parse("fsia", np, &info.port_a, &pdev->dev);
fsi_of_parse("fsib", np, &info.port_b, &pdev->dev);
}
} else { } else {
const struct platform_device_id *id_entry = pdev->id_entry; const struct platform_device_id *id_entry = pdev->id_entry;
if (id_entry) if (id_entry)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment