diff options
Diffstat (limited to 'drivers/spi/zynq_qspi.c')
-rw-r--r-- | drivers/spi/zynq_qspi.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/spi/zynq_qspi.c b/drivers/spi/zynq_qspi.c index d01e4a8e6c..3da245feb7 100644 --- a/drivers/spi/zynq_qspi.c +++ b/drivers/spi/zynq_qspi.c @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0+ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2019 Xilinx, Inc. * @@ -125,7 +125,7 @@ */ struct zynq_qspi { struct spi_controller ctlr; - struct device_d *dev; + struct device *dev; void __iomem *regs; struct clk *refclk; struct clk *pclk; @@ -539,9 +539,9 @@ static const struct spi_controller_mem_ops zynq_qspi_mem_ops = { .exec_op = zynq_qspi_exec_mem_op, }; -static int zynq_qspi_probe(struct device_d *dev) +static int zynq_qspi_probe(struct device *dev) { - struct device_node *np = dev->device_node; + struct device_node *np = dev->of_node; struct spi_controller *ctlr; struct zynq_qspi *xqspi; struct resource *iores; @@ -559,13 +559,13 @@ static int zynq_qspi_probe(struct device_d *dev) xqspi->regs = IOMEM(iores->start); xqspi->pclk = clk_get(dev, "pclk"); - if (IS_ERR_OR_NULL(xqspi->pclk)) { + if (IS_ERR(xqspi->pclk)) { dev_err(dev, "pclk clock not found.\n"); return PTR_ERR(xqspi->pclk); } xqspi->refclk = clk_get(dev, "ref_clk"); - if (IS_ERR_OR_NULL(xqspi->refclk)) { + if (IS_ERR(xqspi->refclk)) { dev_err(dev, "ref_clk clock not found.\n"); return PTR_ERR(xqspi->refclk); } @@ -603,8 +603,9 @@ static const struct of_device_id zynq_qspi_of_match[] = { { .compatible = "xlnx,zynq-qspi-1.0", }, { /* end of table */ } }; +MODULE_DEVICE_TABLE(of, zynq_qspi_of_match); -static struct driver_d zynq_qspi_driver = { +static struct driver zynq_qspi_driver = { .name = "zynq-qspi", .probe = zynq_qspi_probe, .of_compatible = DRV_OF_COMPAT(zynq_qspi_of_match), |