]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
ASoC: fsi: Use of_device_get_match_data() helper
authorGeert Uytterhoeven <geert+renesas@glider.be>
Wed, 4 Oct 2017 12:28:30 +0000 (14:28 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 4 Oct 2017 14:48:05 +0000 (15:48 +0100)
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>
sound/soc/sh/fsi.c

index 6d3c7706d93fbc1019377b48212c41e521a4b0e9..c3aaf4788557c4e14503d70f7b80ffe7d9a5c859 100644 (file)
@@ -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)