summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-sh-msiof.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2017-10-04 08:20:27 -0400
committerMark Brown <broonie@kernel.org>2017-10-04 10:48:20 -0400
commitecb1596aa27856a256b0698a93d7be06ce041e73 (patch)
tree934c25aa250bd9a289ce8a1eba096b73e779fff6 /drivers/spi/spi-sh-msiof.c
parent4702f4b23a2fc6196abacf515a959e69176da40e (diff)
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: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-sh-msiof.c')
-rw-r--r--drivers/spi/spi-sh-msiof.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c
index 00808448cf35..2c5ea4c57508 100644
--- a/drivers/spi/spi-sh-msiof.c
+++ b/drivers/spi/spi-sh-msiof.c
@@ -1211,15 +1211,13 @@ static int sh_msiof_spi_probe(struct platform_device *pdev)
1211 struct resource *r; 1211 struct resource *r;
1212 struct spi_master *master; 1212 struct spi_master *master;
1213 const struct sh_msiof_chipdata *chipdata; 1213 const struct sh_msiof_chipdata *chipdata;
1214 const struct of_device_id *of_id;
1215 struct sh_msiof_spi_info *info; 1214 struct sh_msiof_spi_info *info;
1216 struct sh_msiof_spi_priv *p; 1215 struct sh_msiof_spi_priv *p;
1217 int i; 1216 int i;
1218 int ret; 1217 int ret;
1219 1218
1220 of_id = of_match_device(sh_msiof_match, &pdev->dev); 1219 chipdata = of_device_get_match_data(&pdev->dev);
1221 if (of_id) { 1220 if (chipdata) {
1222 chipdata = of_id->data;
1223 info = sh_msiof_spi_parse_dt(&pdev->dev); 1221 info = sh_msiof_spi_parse_dt(&pdev->dev);
1224 } else { 1222 } else {
1225 chipdata = (const void *)pdev->id_entry->driver_data; 1223 chipdata = (const void *)pdev->id_entry->driver_data;