]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - drivers/spi/spi-fsl-espi.c
tree-wide: use reinit_completion instead of INIT_COMPLETION
[mirror_ubuntu-zesty-kernel.git] / drivers / spi / spi-fsl-espi.c
index b8f1103fe28ee63a4d5209f5f88466fdc84255af..80d8f40f7e0553d600f1e36b018daa7fae275a64 100644 (file)
@@ -16,6 +16,8 @@
 #include <linux/fsl_devices.h>
 #include <linux/mm.h>
 #include <linux/of.h>
+#include <linux/of_address.h>
+#include <linux/of_irq.h>
 #include <linux/of_platform.h>
 #include <linux/interrupt.h>
 #include <linux/err.h>
@@ -230,7 +232,7 @@ static int fsl_espi_bufs(struct spi_device *spi, struct spi_transfer *t)
        mpc8xxx_spi->tx = t->tx_buf;
        mpc8xxx_spi->rx = t->rx_buf;
 
-       INIT_COMPLETION(mpc8xxx_spi->done);
+       reinit_completion(&mpc8xxx_spi->done);
 
        /* Set SPCOM[CS] and SPCOM[TRANLEN] field */
        if ((t->len - 1) > SPCOM_TRANLEN_MAX) {
@@ -289,8 +291,8 @@ static void fsl_espi_do_trans(struct spi_message *m,
                if ((first->bits_per_word != t->bits_per_word) ||
                        (first->speed_hz != t->speed_hz)) {
                        espi_trans->status = -EINVAL;
-                       dev_err(mspi->dev, "bits_per_word/speed_hz should be"
-                                       " same for the same SPI transfer\n");
+                       dev_err(mspi->dev,
+                               "bits_per_word/speed_hz should be same for the same SPI transfer\n");
                        return;
                }
 
@@ -687,7 +689,7 @@ static int of_fsl_espi_probe(struct platform_device *ofdev)
        struct device_node *np = ofdev->dev.of_node;
        struct spi_master *master;
        struct resource mem;
-       struct resource irq;
+       unsigned int irq;
        int ret = -ENOMEM;
 
        ret = of_mpc8xxx_spi_probe(ofdev);
@@ -702,13 +704,13 @@ static int of_fsl_espi_probe(struct platform_device *ofdev)
        if (ret)
                goto err;
 
-       ret = of_irq_to_resource(np, 0, &irq);
+       irq = irq_of_parse_and_map(np, 0);
        if (!ret) {
                ret = -EINVAL;
                goto err;
        }
 
-       master = fsl_espi_probe(dev, &mem, irq.start);
+       master = fsl_espi_probe(dev, &mem, irq);
        if (IS_ERR(master)) {
                ret = PTR_ERR(master);
                goto err;