]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
spi: sh-msiof: Use of_device_get_match_data() helper
authorGeert Uytterhoeven <geert+renesas@glider.be>
Wed, 4 Oct 2017 12:20:27 +0000 (14:20 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 4 Oct 2017 14:48:20 +0000 (15:48 +0100)
Use the of_device_get_match_data() helper instead of open coding.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-sh-msiof.c

index 00808448cf35b87cce4ff6593ce630c1acba3557..2c5ea4c57508d2b596fff9acdfe908773f5bec24 100644 (file)
@@ -1211,15 +1211,13 @@ static int sh_msiof_spi_probe(struct platform_device *pdev)
        struct resource *r;
        struct spi_master *master;
        const struct sh_msiof_chipdata *chipdata;
-       const struct of_device_id *of_id;
        struct sh_msiof_spi_info *info;
        struct sh_msiof_spi_priv *p;
        int i;
        int ret;
 
-       of_id = of_match_device(sh_msiof_match, &pdev->dev);
-       if (of_id) {
-               chipdata = of_id->data;
+       chipdata = of_device_get_match_data(&pdev->dev);
+       if (chipdata) {
                info = sh_msiof_spi_parse_dt(&pdev->dev);
        } else {
                chipdata = (const void *)pdev->id_entry->driver_data;