Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 551f6a58 authored by Mark Brown's avatar Mark Brown
Browse files

Merge branch 'topic/checkpatch' of...

Merge branch 'topic/checkpatch' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi into spi-dw
parents 197e96b4 a2cea983
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -167,8 +167,10 @@ static void davinci_spi_rx_buf_u16(u32 data, struct davinci_spi *dspi)
static u32 davinci_spi_tx_buf_u8(struct davinci_spi *dspi)
{
	u32 data = 0;

	if (dspi->tx) {
		const u8 *tx = dspi->tx;

		data = *tx++;
		dspi->tx = tx;
	}
@@ -178,8 +180,10 @@ static u32 davinci_spi_tx_buf_u8(struct davinci_spi *dspi)
static u32 davinci_spi_tx_buf_u16(struct davinci_spi *dspi)
{
	u32 data = 0;

	if (dspi->tx) {
		const u16 *tx = dspi->tx;

		data = *tx++;
		dspi->tx = tx;
	}
@@ -985,8 +989,8 @@ static int davinci_spi_probe(struct platform_device *pdev)
			goto free_clk;

		dev_info(&pdev->dev, "DMA: supported\n");
		dev_info(&pdev->dev, "DMA: RX channel: %pa, TX channel: %pa, "
				"event queue: %d\n", &dma_rx_chan, &dma_tx_chan,
		dev_info(&pdev->dev, "DMA: RX channel: %pa, TX channel: %pa, event queue: %d\n",
				&dma_rx_chan, &dma_tx_chan,
				pdata->dma_event_q);
	}

+9 −7
Original line number Diff line number Diff line
@@ -131,7 +131,6 @@ static int mrst_spi_debugfs_init(struct dw_spi *dws)

static void mrst_spi_debugfs_remove(struct dw_spi *dws)
{
	if (dws->debugfs)
	debugfs_remove_recursive(dws->debugfs);
}

@@ -173,7 +172,7 @@ static inline u32 rx_max(struct dw_spi *dws)
{
	u32 rx_left = (dws->rx_end - dws->rx) / dws->n_bytes;

	return min(rx_left, (u32)dw_readw(dws, DW_SPI_RXFLR));
	return min_t(u32, rx_left, dw_readw(dws, DW_SPI_RXFLR));
}

static void dw_writer(struct dw_spi *dws)
@@ -224,7 +223,8 @@ static void *next_transfer(struct dw_spi *dws)
					struct spi_transfer,
					transfer_list);
		return RUNNING_STATE;
	} else
	}

	return DONE_STATE;
}

@@ -467,10 +467,12 @@ static void pump_transfers(unsigned long data)
	 */
	if (!dws->dma_mapped && !chip->poll_mode) {
		int templen = dws->len / dws->n_bytes;

		txint_level = dws->fifo_len / 2;
		txint_level = (templen > txint_level) ? txint_level : templen;

		imask |= SPI_INT_TXEI | SPI_INT_TXOI | SPI_INT_RXUI | SPI_INT_RXOI;
		imask |= SPI_INT_TXEI | SPI_INT_TXOI |
			 SPI_INT_RXUI | SPI_INT_RXOI;
		dws->transfer_handler = interrupt_transfer;
	}

@@ -511,7 +513,6 @@ static void pump_transfers(unsigned long data)

early_exit:
	giveback(dws);
	return;
}

static int dw_spi_transfer_one_message(struct spi_master *master,
@@ -615,6 +616,7 @@ static void spi_hw_init(struct dw_spi *dws)
	 */
	if (!dws->fifo_len) {
		u32 fifo;

		for (fifo = 2; fifo <= 257; fifo++) {
			dw_writew(dws, DW_SPI_TXFLTR, fifo);
			if (fifo != dw_readw(dws, DW_SPI_TXFLTR))
+1 −0
Original line number Diff line number Diff line
@@ -266,6 +266,7 @@ static int ep93xx_spi_setup(struct spi_device *spi)

		if (chip->ops && chip->ops->setup) {
			int ret = chip->ops->setup(spi);

			if (ret) {
				kfree(chip);
				return ret;
+3 −1
Original line number Diff line number Diff line
@@ -154,12 +154,14 @@ static int mxs_ssp_wait(struct mxs_spi *spi, int offset, int mask, bool set)
static void mxs_ssp_dma_irq_callback(void *param)
{
	struct mxs_spi *spi = param;

	complete(&spi->c);
}

static irqreturn_t mxs_ssp_irq_handler(int irq, void *dev_id)
{
	struct mxs_ssp *ssp = dev_id;

	dev_err(ssp->dev, "%s[%i] CTRL1=%08x STATUS=%08x\n",
		__func__, __LINE__,
		readl(ssp->base + HW_SSP_CTRL1(ssp)),
@@ -189,7 +191,7 @@ static int mxs_spi_txrx_dma(struct mxs_spi *spi,
	if (!len)
		return -EINVAL;

	dma_xfer = kzalloc(sizeof(*dma_xfer) * sgs, GFP_KERNEL);
	dma_xfer = kcalloc(sgs, sizeof(*dma_xfer), GFP_KERNEL);
	if (!dma_xfer)
		return -ENOMEM;

+3 −2
Original line number Diff line number Diff line
@@ -179,7 +179,7 @@ static inline int orion_spi_wait_till_ready(struct orion_spi *orion_spi)
	for (i = 0; i < ORION_SPI_WAIT_RDY_MAX_LOOP; i++) {
		if (readl(spi_reg(orion_spi, ORION_SPI_INT_CAUSE_REG)))
			return 1;
		else

		udelay(1);
	}

@@ -360,6 +360,7 @@ static int orion_spi_probe(struct platform_device *pdev)
		master->bus_num = pdev->id;
	if (pdev->dev.of_node) {
		u32 cell_index;

		if (!of_property_read_u32(pdev->dev.of_node, "cell-index",
					  &cell_index))
			master->bus_num = cell_index;
Loading