diff options
author | Tian Tao | 2021-03-22 11:57:56 +0800 |
---|---|---|
committer | Mark Brown | 2021-03-25 13:58:55 +0000 |
commit | 200d925e236f1a839bd52680f13649b23f727d51 (patch) | |
tree | daa2a8a21b3e8c29705ede31bc66ec2c5dfe918b /drivers/spi/spi-imx.c | |
parent | 3f994c25868729fb63a4eef42a7040e563eff365 (diff) |
spi: imx: Use of_device_get_match_data() helper
Use the of_device_get_match_data() helper instead of open coding.
Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Link: https://lore.kernel.org/r/1616385476-53327-1-git-send-email-tiantao6@hisilicon.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-imx.c')
-rw-r--r-- | drivers/spi/spi-imx.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c index 5dc4ea4b4450..916580740e77 100644 --- a/drivers/spi/spi-imx.c +++ b/drivers/spi/spi-imx.c @@ -1548,13 +1548,12 @@ static int spi_imx_slave_abort(struct spi_master *master) static int spi_imx_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; - const struct of_device_id *of_id = - of_match_device(spi_imx_dt_ids, &pdev->dev); struct spi_master *master; struct spi_imx_data *spi_imx; struct resource *res; int ret, irq, spi_drctl; - const struct spi_imx_devtype_data *devtype_data = of_id->data; + const struct spi_imx_devtype_data *devtype_data = + of_device_get_match_data(&pdev->dev); bool slave_mode; u32 val; |