spi : spi_qsd : Initialise complete signal only once in probe

Initialise complete signal only once in driver probe and do
reinitialise in the spi transfer function for the later uses
of the complete signal.

Change-Id: Ia12ada9ce7cf2552c10f5c2a7d90c1f4c7204647
Signed-off-by: Prudhvi Yarlagadda <pyarlaga@codeaurora.org>
This commit is contained in:
Prudhvi Yarlagadda 2019-10-30 12:32:58 +05:30
parent ae5acb1279
commit 04c6078424

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2008-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2008-2019, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@ -1390,8 +1390,8 @@ static int msm_spi_process_transfer(struct msm_spi *dd)
dd->write_buf = dd->cur_transfer->tx_buf;
dd->tx_done = false;
dd->rx_done = false;
init_completion(&dd->tx_transfer_complete);
init_completion(&dd->rx_transfer_complete);
reinit_completion(&dd->tx_transfer_complete);
reinit_completion(&dd->rx_transfer_complete);
if (dd->cur_transfer->bits_per_word)
bpw = dd->cur_transfer->bits_per_word;
else
@ -2716,6 +2716,8 @@ skip_dma_resources:
spin_lock_init(&dd->queue_lock);
mutex_init(&dd->core_lock);
init_waitqueue_head(&dd->continue_suspend);
init_completion(&dd->tx_transfer_complete);
init_completion(&dd->rx_transfer_complete);
if (!devm_request_mem_region(&pdev->dev, dd->mem_phys_addr,
dd->mem_size, SPI_DRV_NAME)) {