summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2017-10-04 14:19:53 +0200
committerMark Brown <broonie@kernel.org>2017-10-04 15:47:38 +0100
commit219a7bc577e6024cd6f84571d93d939b3517aafe (patch)
treed78790a3887f5e96efbd7523ee7a4ad57d3e2b59 /drivers
parent10c1705eced11d6ad710fddcdb57aaa9f85a6f98 (diff)
downloadlinux-219a7bc577e6024cd6f84571d93d939b3517aafe.tar.bz2
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>
Diffstat (limited to 'drivers')
-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)
struct spi_master *master;
struct rspi_data *rspi;
int ret;
- const struct of_device_id *of_id;
const struct rspi_plat_data *rspi_pd;
const struct spi_ops *ops;
@@ -1229,9 +1228,8 @@ static int rspi_probe(struct platform_device *pdev)
if (master == NULL)
return -ENOMEM;
- of_id = of_match_device(rspi_of_match, &pdev->dev);
- if (of_id) {
- ops = of_id->data;
+ ops = of_device_get_match_data(&pdev->dev);
+ if (ops) {
ret = rspi_parse_dt(&pdev->dev, master);
if (ret)
goto error1;