platform: msm_shared: Add API to unlock BAM pipes

Add API to unlock BAM pipes used for crypto engine
and unlock the pipes once data transfer is over.

Change-Id: Ie51817ca85dc90966a312adabedccf18d8fa2edb
diff --git a/platform/msm_shared/crypto5_eng.c b/platform/msm_shared/crypto5_eng.c
index 3f21845..ff3c541 100644
--- a/platform/msm_shared/crypto5_eng.c
+++ b/platform/msm_shared/crypto5_eng.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -527,9 +527,16 @@
 
 CRYPTO_SEND_DATA_ERR:
 
+	crypto5_unlock_pipes(dev);
+
 	return ret_status;
 }
 
+void crypto5_unlock_pipes(struct crypto_dev *dev)
+{
+	CLEAR_STATUS(dev);
+}
+
 void crypto5_cleanup(struct crypto_dev *dev)
 {
 	CLEAR_STATUS(dev);