aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2017-10-04 08:19:53 -0400
committerMark Brown <broonie@kernel.org>2017-10-04 10:47:38 -0400
commit219a7bc577e6024cd6f84571d93d939b3517aafe (patch)
treed78790a3887f5e96efbd7523ee7a4ad57d3e2b59
parent10c1705eced11d6ad710fddcdb57aaa9f85a6f98 (diff)
spi: rspi: 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>
-rw-r--r--drivers/spi/spi-rspi.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
index 2a10b3f94ff7..2ce875764ca6 100644
--- a/drivers/spi/spi-rspi.c
+++ b/drivers/spi/spi-rspi.c
@@ -1221,7 +1221,6 @@ static int rspi_probe(struct platform_device *pdev)
1221 struct spi_master *master; 1221 struct spi_master *master;
1222 struct rspi_data *rspi; 1222 struct rspi_data *rspi;
1223 int ret; 1223 int ret;
1224 const struct of_device_id *of_id;
1225 const struct rspi_plat_data *rspi_pd; 1224 const struct rspi_plat_data *rspi_pd;
1226 const struct spi_ops *ops; 1225 const struct spi_ops *ops;
1227 1226
@@ -1229,9 +1228,8 @@ static int rspi_probe(struct platform_device *pdev)
1229 if (master == NULL) 1228 if (master == NULL)
1230 return -ENOMEM; 1229 return -ENOMEM;
1231 1230
1232 of_id = of_match_device(rspi_of_match, &pdev->dev); 1231 ops = of_device_get_match_data(&pdev->dev);
1233 if (of_id) { 1232 if (ops) {
1234 ops = of_id->data;
1235 ret = rspi_parse_dt(&pdev->dev, master); 1233 ret = rspi_parse_dt(&pdev->dev, master);
1236 if (ret) 1234 if (ret)
1237 goto error1; 1235 goto error1;