[Replicant] [libsamsung-ipc] [PATCH 3/7] xmm626_mipi_modem_data_send: pass the ipc_client struct

Denis 'GNUtoo' Carikli GNUtoo at cyberdimension.org
Fri Jul 24 19:47:21 UTC 2020


This enables to use logging inside the callbacks.

At this point the ipc_client struct is already available,
so it is safe to do that.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at cyberdimension.org>
---
 samsung-ipc/modems/xmm626/xmm626_mipi.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/samsung-ipc/modems/xmm626/xmm626_mipi.c b/samsung-ipc/modems/xmm626/xmm626_mipi.c
index 375ded0..75c49d5 100644
--- a/samsung-ipc/modems/xmm626/xmm626_mipi.c
+++ b/samsung-ipc/modems/xmm626/xmm626_mipi.c
@@ -419,8 +419,10 @@ complete:
 	return rc;
 }
 
-int xmm626_mipi_modem_data_send(int device_fd, const void *data, size_t size,
-				int address)
+int xmm626_mipi_modem_data_send(
+	__attribute__((unused)) struct ipc_client *client,
+	int device_fd, const void *data, size_t size,
+	int address)
 {
 	size_t chunk;
 	size_t count;
@@ -588,7 +590,7 @@ int xmm626_mipi_firmware_send(struct ipc_client *client, int device_fd,
 		return -1;
 	}
 
-	rc = xmm626_mipi_modem_data_send(device_fd, firmware_data,
+	rc = xmm626_mipi_modem_data_send(client, device_fd, firmware_data,
 					 firmware_size,
 					 XMM626_FIRMWARE_ADDRESS);
 	if (rc < 0)
@@ -617,7 +619,7 @@ int xmm626_mipi_nv_data_send(struct ipc_client *client, int device_fd)
 	}
 	ipc_client_log(client, "Loaded nv_data");
 
-	rc = xmm626_mipi_modem_data_send(device_fd, nv_data, nv_size,
+	rc = xmm626_mipi_modem_data_send(client, device_fd, nv_data, nv_size,
 					 XMM626_NV_DATA_ADDRESS);
 	if (rc < 0)
 		goto error;
@@ -645,7 +647,7 @@ int xmm626_mipi_mps_data_send(struct ipc_client *client, int device_fd,
 		return -1;
 	}
 
-	rc = xmm626_mipi_modem_data_send(device_fd, mps_data, mps_size,
+	rc = xmm626_mipi_modem_data_send(client, device_fd, mps_data, mps_size,
 					 XMM626_MPS_DATA_ADDRESS);
 	if (rc < 0)
 		return -1;
-- 
2.27.0



More information about the Replicant mailing list