mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 08:19:28 +00:00
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>
This commit is contained in:
parent
10c1705ece
commit
219a7bc577
1 changed files with 2 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue