[PATCH v1 09/12] drivers: soc: qcom: Remove is_mem_dump_mode variable.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sahara driver now has "sahara_mode" enum defined. So, the variable
"is_mem_dump_mode" is redundant. The mode of sahara is set to
SAHARA_MODE_MEM_DUMP wherever required.

Signed-off-by: Kishore Batta <kishore.batta@xxxxxxxxxxxxxxxx>
---
 drivers/soc/qcom/sahara/sahara.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/qcom/sahara/sahara.c b/drivers/soc/qcom/sahara/sahara.c
index 84327af48569..81d9b40d0f92 100644
--- a/drivers/soc/qcom/sahara/sahara.c
+++ b/drivers/soc/qcom/sahara/sahara.c
@@ -193,7 +193,6 @@ struct sahara_context {
 	u64				dump_image_offset;
 	void				*mem_dump_freespace;
 	u64				dump_images_left;
-	bool				is_mem_dump_mode;
 	enum sahara_mode		current_mode;
 };
 
@@ -302,7 +301,6 @@ static void sahara_send_reset(struct sahara_context *context)
 	sahara_data = dev_get_drvdata(&context->mhi_dev->dev);
 	sdev = sahara_data->sdev;
 
-	context->is_mem_dump_mode = false;
 	context->current_mode = SAHARA_MODE_NONE;
 	sdev->receiving_trng_data = false;
 
@@ -515,7 +513,7 @@ static void sahara_memory_debug64(struct sahara_context *context)
 	 * of the dump are that we can consume.
 	 */
 
-	context->is_mem_dump_mode = true;
+	context->current_mode = SAHARA_MODE_MEM_DUMP;
 
 	/*
 	 * Assume that the table is smaller than our MTU so that we can read it
@@ -971,7 +969,7 @@ static void sahara_mhi_dl_xfer_cb(struct mhi_device *mhi_dev, struct mhi_result
 
 	if (!mhi_result->transaction_status) {
 		context->rx_size = mhi_result->bytes_xferd;
-		if (context->is_mem_dump_mode)
+		if (context->current_mode == SAHARA_MODE_MEM_DUMP)
 			schedule_work(&context->dump_work);
 		else
 			schedule_work(&context->fw_work);
-- 
2.34.1





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux