cs |= spi->chip_select;
}
---- -- INIT_COMPLETION(bs->done);
++++ ++ reinit_completion(&bs->done);
bs->tx_buf = tfr->tx_buf;
bs->rx_buf = tfr->rx_buf;
bs->len = tfr->len;
static int bcm2835_spi_remove(struct platform_device *pdev)
{
- ------- struct spi_master *master = spi_master_get(platform_get_drvdata(pdev));
+ +++++++ struct spi_master *master = platform_get_drvdata(pdev);
struct bcm2835_spi *bs = spi_master_get_devdata(master);
free_irq(bs->irq, master);
#include <linux/errno.h>
#include <linux/interrupt.h>
#include <linux/of_address.h>
++++ ++#include <linux/of_irq.h>
#include <linux/of_platform.h>
#include <linux/completion.h>
#include <linux/io.h>
}
/* have the ISR trigger when the TX FIFO is empty */
---- -- INIT_COMPLETION(mps->txisrdone);
++++ ++ reinit_completion(&mps->txisrdone);
out_be32(&fifo->txisr, MPC512x_PSC_FIFO_EMPTY);
out_be32(&fifo->tximr, MPC512x_PSC_FIFO_EMPTY);
wait_for_completion(&mps->txisrdone);
static int mpc512x_psc_spi_do_remove(struct device *dev)
{
--- ----- struct spi_master *master = spi_master_get(dev_get_drvdata(dev));
+++ +++++ struct spi_master *master = dev_get_drvdata(dev);
struct mpc512x_psc_spi *mps = spi_master_get_devdata(master);
clk_disable_unprepare(mps->clk_mclk);
if (!dma_xfer)
return -ENOMEM;
---- -- INIT_COMPLETION(spi->c);
++++ ++ reinit_completion(&spi->c);
/* Chip select was already programmed into CTRL0 */
ctrl0 = readl(ssp->base + HW_SSP_CTRL0);
struct mxs_spi *spi;
struct mxs_ssp *ssp;
---- ---- master = spi_master_get(platform_get_drvdata(pdev));
++++ ++++ master = platform_get_drvdata(pdev);
spi = spi_master_get_devdata(master);
ssp = &spi->ssp;