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

spi: sh-msiof: Use of_device_get_match_data() helper

Use the of_device_get_match_data() helper instead of open coding.
Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 4702f4b2
...@@ -1211,15 +1211,13 @@ static int sh_msiof_spi_probe(struct platform_device *pdev) ...@@ -1211,15 +1211,13 @@ static int sh_msiof_spi_probe(struct platform_device *pdev)
struct resource *r; struct resource *r;
struct spi_master *master; struct spi_master *master;
const struct sh_msiof_chipdata *chipdata; const struct sh_msiof_chipdata *chipdata;
const struct of_device_id *of_id;
struct sh_msiof_spi_info *info; struct sh_msiof_spi_info *info;
struct sh_msiof_spi_priv *p; struct sh_msiof_spi_priv *p;
int i; int i;
int ret; int ret;
of_id = of_match_device(sh_msiof_match, &pdev->dev); chipdata = of_device_get_match_data(&pdev->dev);
if (of_id) { if (chipdata) {
chipdata = of_id->data;
info = sh_msiof_spi_parse_dt(&pdev->dev); info = sh_msiof_spi_parse_dt(&pdev->dev);
} else { } else {
chipdata = (const void *)pdev->id_entry->driver_data; chipdata = (const void *)pdev->id_entry->driver_data;
......
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