aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-tegra20-slink.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/spi/spi-tegra20-slink.c')
-rw-r--r--drivers/spi/spi-tegra20-slink.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c
index c70353672a23..36d4e663db9b 100644
--- a/drivers/spi/spi-tegra20-slink.c
+++ b/drivers/spi/spi-tegra20-slink.c
@@ -707,8 +707,7 @@ static void tegra_slink_deinit_dma_param(struct tegra_slink_data *tspi,
707} 707}
708 708
709static int tegra_slink_start_transfer_one(struct spi_device *spi, 709static int tegra_slink_start_transfer_one(struct spi_device *spi,
710 struct spi_transfer *t, bool is_first_of_msg, 710 struct spi_transfer *t, bool is_first_of_msg)
711 bool is_single_xfer)
712{ 711{
713 struct tegra_slink_data *tspi = spi_master_get_devdata(spi->master); 712 struct tegra_slink_data *tspi = spi_master_get_devdata(spi->master);
714 u32 speed; 713 u32 speed;
@@ -828,7 +827,6 @@ static int tegra_slink_transfer_one_message(struct spi_master *master,
828 struct spi_message *msg) 827 struct spi_message *msg)
829{ 828{
830 bool is_first_msg = true; 829 bool is_first_msg = true;
831 int single_xfer;
832 struct tegra_slink_data *tspi = spi_master_get_devdata(master); 830 struct tegra_slink_data *tspi = spi_master_get_devdata(master);
833 struct spi_transfer *xfer; 831 struct spi_transfer *xfer;
834 struct spi_device *spi = msg->spi; 832 struct spi_device *spi = msg->spi;
@@ -837,11 +835,9 @@ static int tegra_slink_transfer_one_message(struct spi_master *master,
837 msg->status = 0; 835 msg->status = 0;
838 msg->actual_length = 0; 836 msg->actual_length = 0;
839 837
840 single_xfer = list_is_singular(&msg->transfers);
841 list_for_each_entry(xfer, &msg->transfers, transfer_list) { 838 list_for_each_entry(xfer, &msg->transfers, transfer_list) {
842 INIT_COMPLETION(tspi->xfer_completion); 839 INIT_COMPLETION(tspi->xfer_completion);
843 ret = tegra_slink_start_transfer_one(spi, xfer, 840 ret = tegra_slink_start_transfer_one(spi, xfer, is_first_msg);
844 is_first_msg, single_xfer);
845 if (ret < 0) { 841 if (ret < 0) {
846 dev_err(tspi->dev, 842 dev_err(tspi->dev,
847 "spi can not start transfer, err %d\n", ret); 843 "spi can not start transfer, err %d\n", ret);