spi: sirf: remove the allocation of dummypage
PATCH 1/2 spi: sirf: remove the allocation of dummypage
From: Qipan Li <[email protected]>
this job has been done by spi core.
--- drivers/spi/spi-sirf.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-)
drivers/spi/spi-sirf.c +3 -9
@@ -303,7 +303,6 @@ struct sirfsoc_spi {struct dma_chan *tx_chan;dma_addr_t src_start;dma_addr_t dst_start; -void *dummypage;int word_width;/* in bytes */ /*
@@ -719,8 +718,8 @@ static int spi_sirfsoc_transfer(struct spi_device *spi, struct spi_transfer *t)struct sirfsoc_spi *sspi; sspi =spi_master_get_devdata (spi->master); - sspi->tx = t->tx_buf ? t->tx_buf : sspi->dummypage; - sspi->rx = t->rx_buf ? t->rx_buf : sspi->dummypage; + sspi->tx = t->tx_buf; + sspi->rx = t->rx_buf; sspi->left_tx_word = sspi->left_rx_word = t->len / sspi->word_width;reinit_completion (&sspi->rx_done);reinit_completion (&sspi->tx_done);
@@ -1114,6 +1113,7 @@ static int spi_sirfsoc_probe(struct platform_device *pdev) master->bits_per_word_mask =SPI_BPW_MASK (8 ) |SPI_BPW_MASK (12 ) |SPI_BPW_MASK (16 ) |SPI_BPW_MASK (32 ); master->max_speed_hz =SIRFSOC_SPI_DEFAULT_FRQ ; + master->flags =SPI_MASTER_MUST_RX |SPI_MASTER_MUST_TX ; sspi->bitbang.master->dev.of_node = pdev->dev.of_node;/* request DMA channels */
@@ -1141,12 +1141,6 @@ static int spi_sirfsoc_probe(struct platform_device *pdev)init_completion (&sspi->rx_done);init_completion (&sspi->tx_done); - sspi->dummypage =devm_kzalloc (&pdev->dev,2 *PAGE_SIZE ,GFP_KERNEL ); -if (!sspi->dummypage) { - ret = -ENOMEM ; - goto free_clk; - } - ret =spi_bitbang_start (&sspi->bitbang);if (ret) goto free_clk;
Signature · 6 lines
2.3.5 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 1432617661-15901-1-git-send-email-21cnbao-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Geert Uytterhoeven
Acked-byQuoted 3 lines · Barry Song
From: Qipan Li <[email protected]>
this job has been done by spi core.
Thanks!
Quoted 3 lines
Cc Geert Uytterhoeven <[email protected]>Signed-off-by Qipan Li <[email protected]>Signed-off-by Barry Song <[email protected]>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Mark Brown
AppliedQuoted 3 lines · Barry Song
From: Qipan Li <[email protected]>
this job has been done by spi core.
Applied, thanks.