diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2017-10-04 14:28:30 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-10-04 15:48:05 +0100 |
commit | b48cc1d9c3a93b239700198f69b1a49b23d95b83 (patch) | |
tree | 5f25463f1bb6758c548e2e26e18071df78f43c52 /sound/soc/sh | |
parent | 2bd6bf03f4c1c59381d62c61d03f6cc3fe71f66e (diff) | |
download | linux-b48cc1d9c3a93b239700198f69b1a49b23d95b83.tar.bz2 |
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: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sh')
-rw-r--r-- | sound/soc/sh/fsi.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index 6d3c7706d93f..c3aaf4788557 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c @@ -1932,14 +1932,9 @@ static int fsi_probe(struct platform_device *pdev) core = NULL; if (np) { - const struct of_device_id *of_id; - - of_id = of_match_device(fsi_of_match, &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); - } + core = of_device_get_match_data(&pdev->dev); + fsi_of_parse("fsia", np, &info.port_a, &pdev->dev); + fsi_of_parse("fsib", np, &info.port_b, &pdev->dev); } else { const struct platform_device_id *id_entry = pdev->id_entry; if (id_entry) |